utils

package
v0.5.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Overview

Package utils provides extra utility for the program

Index

Constants

View Source
const ProgramName = "go-blueprint"

Variables

This section is empty.

Functions

func CheckGitConfig added in v0.5.3

func CheckGitConfig(key string) (bool, error)

func ExecuteCmd

func ExecuteCmd(name string, args []string, dir string) error

ExecuteCmd provides a shorthand way to run a shell command

func GoFmt

func GoFmt(appDir string) error

GoFmt runs "gofmt" in a selected directory using the simplify and overwrite flags

func GoGetPackage

func GoGetPackage(appDir string, packages []string) error

GoGetPackage runs "go get" for a given package in the selected directory

func GoTidy added in v0.3.0

func GoTidy(appDir string) error

func InitGoMod

func InitGoMod(projectName string, appDir string) error

InitGoMod initializes go.mod with the given project name in the selected directory

func NonInteractiveCommand added in v0.2.9

func NonInteractiveCommand(use string, flagSet *pflag.FlagSet) string

NonInteractiveCommand creates the command string from a flagSet to be used for getting the equivalent non-interactive shell command

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL