package
1.0.0
Repository: https://github.com/aesoper101/go-utils.git
Documentation: pkg.go.dev

# Functions

CollectImports returns all the imports by Parser.
FormatCodeFromParser formats the given source code from a parser.
FormatCodeFromSource formats the given source code.
No description provided by the author
GoBin returns the path to the go binary.
GoInstall is a functionx that installs a package from a remote repository.
GoModCachePath returns the path of Go module cache.
GoModFilePath returns the full path to the go.mod file for the current project.
GoModName returns the name of the current project without version.
GoModPath returns the directory path of the go.mod file for the current project.
GoPath returns the GOPATH.
GoProxy returns the proxy setting for go.
GoRoot returns the GOROOT.
GoVersion returns the go version.
ImportPathForDir takes a path and returns a golang import path for the package taken from "github.com/99designs/gqlgen/internal/codegen/imports.go".
IsGO111ModuleOn returns true if go111module is set to on.
IsGoFile checks if the given file is a go file.
IsGoModProject returns true if the current project is a Go module project.
IsInvalidPackageName returns true if the package name is invalid.
IsValidPackageName returns true if the package name is valid.
MustParser is a convenience wrapper for NewParser that panics if NewParser returns an error.
NameForDir returns the name of the package for the given directory.
NewImport creates an import spec.
NewParser returns a new Parser.
NormalizeVendor takes a qualified package path and turns it into normal one.
QualifyPackagePath takes an import and fully qualifies it with a vendor dir, if one is required.
RefPathToGoModPath returns the relative path to the go.mod file for the given path.
RemoveUnusedImports removes unused imports from the file.
SanitizePackageName replaces invalid package name characters with '_'.
SimpleImport creates an import with no explicit path component.
SortImports sorts the imports in the file.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

ImportSpec represents a single import spec.
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author