Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DONT REVIEW] test a fake PR #4061

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions go/tools/internal/txtar/archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
//
// The goals for the format are:
//
// - be trivial enough to create and edit by hand.
// - be able to store trees of text files describing go command test cases.
// - diff nicely in git history and code reviews.
// - be trivial enough to create and edit by hand.
// - be able to store trees of text files describing go command test cases.
// - diff nicely in git history and code reviews.
//
// Non-goals include being a completely general archive format,
// storing binary data, storing file modes, storing special files like
// symbolic links, and so on.
//
// Txtar format
// # Txtar format
//
// A txtar archive is zero or more comment lines and then a sequence of file entries.
// Each file entry begins with a file marker line of the form "-- FILENAME --"
Expand Down Expand Up @@ -44,10 +44,15 @@ type Archive struct {
Files []File
}

type NewType struct {
Test string
}

// A File is a single file in an archive.
type File struct {
Name string // name of file ("foo/bar.txt")
Data []byte // text content of file
Name string // name of file ("foo/bar.txt")
Data []byte // text content of file
Something byte
}

// Format returns the serialized form of an Archive.
Expand Down