utils

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 4 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 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 HasChangedFlag added in v0.2.9

func HasChangedFlag(flagSet *pflag.FlagSet) bool

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