func ResolveSourcemapURL(basename, source string) *url.URL
type File struct {
// contains filtered or unexported fields
}
func NewFile(filename, src string, base int) *File
func (fl *File) Base() int
func (fl *File) Name() string
func (fl *File) Position(offset int) Position
func (fl *File) SetSourceMap(m *sourcemap.Consumer)
func (fl *File) Source() string
A FileSet represents a set of source files.
type FileSet struct {
// contains filtered or unexported fields
}
func (self *FileSet) AddFile(filename, src string) int
AddFile adds a new file with the given filename and src.
This an internal method, but exported for cross-package use.
func (self *FileSet) File(idx Idx) *File
func (self *FileSet) Position(idx Idx) Position
Position converts an Idx in the FileSet into a Position.
Idx is a compact encoding of a source position within a file set. It can be converted into a Position for a more convenient, but much larger, representation.
type Idx int
Position describes an arbitrary source position including the filename, line, and column location.
type Position struct { Filename string // The filename where the error occurred, if any Line int // The line number, starting at 1 Column int // The column number, starting at 1 (The character count) }
func (self Position) String() string
String returns a string in one of several forms:
file:line:column A valid position with filename line:column A valid position without filename file An invalid position with filename - An invalid position without filename