Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleParseFile (0.16 sec)

  1. src/go/parser/example_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package parser_test
    
    import (
    	"fmt"
    	"go/parser"
    	"go/token"
    )
    
    func ExampleParseFile() {
    	fset := token.NewFileSet() // positions are relative to fset
    
    	src := `package foo
    
    import (
    	"fmt"
    	"time"
    )
    
    func bar() {
    	fmt.Println(time.Now())
    }`
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 03 16:07:09 UTC 2017
    - 715 bytes
    - Viewed (0)
Back to top