Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SourceCodeRunType ¶
type SourceCodeRunType int
SourceCodeRunType 如果是从源代码运行的话,则入口是啥
const ( // SourceCodeRunTypeUnknown 只知道是从源代码中运行的,但是入口俺也不知道 SourceCodeRunTypeUnknown SourceCodeRunType = iota // SourceCodeRunTypeExample 是从Example运行的 SourceCodeRunTypeExample // SourceCodeRunTypeBenchmark 是从Benchmark运行的 SourceCodeRunTypeBenchmark // SourceCodeRunTypeMain 是从main.go运行的 SourceCodeRunTypeMain // SourceCodeRunTypeTest 是从测试用例运行的 SourceCodeRunTypeTest )
func GetSourceCodeRunType ¶
func GetSourceCodeRunType() (SourceCodeRunType, error)
GetSourceCodeRunType 如果是从源代码运行的,则是以什么方式运行的
Example ¶
runType, err := GetSourceCodeRunType() if err != nil { fmt.Println(err.Error()) return } fmt.Println(runType)
Output: 1
func (SourceCodeRunType) String ¶
func (x SourceCodeRunType) String() string
Click to show internal directories.
Click to hide internal directories.