hugo: github.com/spf13/hugo/commands Index | Files

package commands

import "github.com/spf13/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

Package 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 new.go new_site.go new_theme.go release_noop.go server.go server_errors.go static_syncer.go version.go

type Response Uses

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 Uses

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 Uses

func (r Response) IsUserError() bool

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

Package commands imports 70 packages (graph) and is imported by 253 packages. Updated 2019-06-15. Refresh now. Tools for package owners.