我有两个main.go 下文件package main,包中还有一些函数,称为函数。 $ z# f* V D# x3 z7 B0 N我的问题是:如何从 调用函数?package main? % N8 ~/ A/ h4 F, [$ b t+ z: R文件 1:main.go(位于 MyProj/main.go) 4 B1 ]$ S' E6 j! | l3 X2 l' q& ?% S
/ l$ R# j5 m" i6 `
package mainimport "fmt"import "functions" // I dont have problem creating the reference herefunc main(){ c:= functions.getValue() // 文件 2:functions.go(位于 MyProj/functions/functions.go)[code]package functionsfunc getValue() string{ return "Hello from this another package"} . I7 [* s, K! J! J' w9 ~- {- ?