package commands

import "github.com/gohugoio/hugo/commands"

Package commands defines and implements command-line commands and flags used by Hugo. Commands and flags are implemented using Cobra.

Package commands defines and implements command-line commands and flags used by Hugo. Commands and flags are implemented using Cobra.

Index

Types

type Response

type Response struct {
	// The build Result will only be set in the hugo build command.
	Result *hugolib.HugoSites

	// Err is set when the command failed to execute.
	Err error

	// The command that was executed.
	Cmd *cobra.Command
}

The Response value from Execute.

func Execute

func Execute(args []string) Response

Execute adds all child commands to the root command HugoCmd and sets flags appropriately. The args are usually filled with os.Args[1:].

func (Response) IsUserError

func (r Response) IsUserError() bool

IsUserError returns true is the Response error is a user error rather than a system error.

Source Files

check.go commandeer.go commands.go config.go convert.go deploy.go env.go gen.go genautocomplete.go genchromastyles.go gendoc.go gendocshelper.go genman.go helpers.go hugo.go import_jekyll.go limit_others.go list.go mod.go mod_npm.go new.go new_site.go new_theme.go release_noop.go server.go server_errors.go static_syncer.go version.go

Version
v0.89.4
Published
Nov 17, 2021
Platform
linux/amd64
Imports
73 packages
Last checked
3 hours ago

Tools for package owners.