Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrModuleNameNotFound = errors.New("module name not found")
Functions ¶
func BuildName ¶
BuildName extracts the last part of the module by splitting on `/` this last part is useful for name of the binary and other things.
func ModuleName ¶
func ModuleName() string
ModuleName returns the full module name from go.mod, it returns empty if there is an issue reading the go.mod
func RootFolder ¶
func RootFolder() string
RootFolder looks for the root folder by scanning from the current directory and up for the first occurrence of go.mod, if it does not find the module returns empty string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.