Documentation
¶
Index ¶
- Constants
- Variables
- func DirHasFileNewerThan(dir string, cutoff time.Time, match func(name string) bool) (bool, error)
- func GoVersion() (string, error)
- func IsGoModuleFile(name string) bool
- func IsGoSourceFile(name string) bool
- func RepoRoot() (string, error)
- func RunIn(dir string, extraEnv []string, name string, args ...string) error
Constants ¶
View Source
const RootModuleDecl = "module github.com/cloudposse/atmos"
RootModuleDecl is the expected first line of the root module's go.mod, used by RepoRoot to recognize the repository root.
Variables ¶
View Source
var ErrRepoRootNotFound = errors.New("mage: could not locate repository root (go.mod for module github.com/cloudposse/atmos)")
Functions ¶
func DirHasFileNewerThan ¶
DirHasFileNewerThan reports whether dir contains a regular file, accepted by match, whose modification time is after cutoff. It is the cross-platform replacement for `find <dir> -type f ... -newer <ref> -print -quit`.
func IsGoModuleFile ¶
IsGoModuleFile reports whether name is a Go source file or a module manifest (go.mod/go.sum).
func IsGoSourceFile ¶
IsGoSourceFile reports whether name is a Go source file.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.