golang.org/x/playground@v0.0.0-20230418134305-14ebe15bcd59/examples/multi.txt (about)

     1  // Title: Multiple files
     2  package main
     3  
     4  import (
     5  	"play.ground/foo"
     6  )
     7  
     8  func main() {
     9  	foo.Bar()
    10  }
    11  
    12  -- go.mod --
    13  module play.ground
    14  
    15  -- foo/foo.go --
    16  package foo
    17  
    18  import "fmt"
    19  
    20  func Bar() {
    21  	fmt.Println("This function lives in an another file!")
    22  }