Documentation ¶
Index ¶
- Variables
- func ExtractModuleNameFromGoMod(goModPath string) (string, error)
- func FindGoModDir(startDir string) (string, error)
- func GenerateRandomIdentifier() string
- func GenerateRandomIdentifierWithRand(n *rand.Rand) string
- func Int64FromString(x string) int64
- func RandSourceFromString(x string) rand.Source
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCannotParseModuleName = errors.New("cannot parse module name from go.mod file")
View Source
var ErrNoGoMod = errors.New("no go.mod file found")
Functions ¶
func FindGoModDir ¶
FindGoModDir will find the directory containing the go.mod file for a project, starting with `startDir`.
If the file cannot be found in the current directory, it will traverse up each directory until it gets to the root directory, looking in each subsequent dir.
func GenerateRandomIdentifier ¶
func GenerateRandomIdentifier() string
func Int64FromString ¶
func RandSourceFromString ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.