Source File
source.go
Belonging Package
src.elv.sh/pkg/parse
package parseimport ()// TODO(xiaq): Move this into the diag package after implementing phantom types.// Source describes a piece of source code.type Source struct {Name stringCode stringIsFile bool}// SourceForTest returns a Source used for testing.func ( string) Source {return Source{Name: "[test]", Code: }}// IsStructMap marks that Source is a structmap.func ( Source) () {}// Repr returns the representation of Source as if it were a map, except that// the code field is replaced by "...", since it is typically very large.func ( Source) (int) string {return fmt.Sprintf("[&name=%s &code=<...> &is-file=$%v]", Quote(.Name), .IsFile)}
The pages are generated with Golds v0.2.8-preview. (GOOS=darwin GOARCH=arm64)