Standard library / go/token

go/token.NewFileSet()

Creates an empty source file set with a positive next base. Expected stdout: '1\n'.

Formal Syntax & Structure

go syntaxgo
func NewFileSet() *FileSet

Return Value

*FileSet

Creates an empty source file set with a positive next base.

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/token")
func main() { fmt.Println(token.NewFileSet().Base()) }
Go Reference