go: cuelang.org/go/cmd/cue/cmd Index | Files | Directories

package cmd

import "cuelang.org/go/cmd/cue/cmd"


Package Files

add.go cmd.go common.go completion.go custom.go def.go eval.go export.go fix.go flags.go fmt.go get.go get_go.go help.go import.go mod.go orphans.go root.go trim.go version.go vet.go


var ErrPrintedError = errors.New("terminating because of errors")

ErrPrintedError indicates error messages have been printed to stderr.

func Main Uses

func Main() int

Main runs the cue tool and returns the code for passing to os.Exit.

func MainTest Uses

func MainTest() int

MainTest is like Main, runs the cue tool and returns the code for passing to os.Exit.

type Command Uses

type Command struct {
    // The currently active command.
    // contains filtered or unexported fields

func New Uses

func New(args []string) (cmd *Command, err error)

func (*Command) Run Uses

func (c *Command) Run(ctx context.Context) (err error)

func (*Command) SetInput Uses

func (c *Command) SetInput(r io.Reader)

func (*Command) SetOutput Uses

func (c *Command) SetOutput(w io.Writer)

func (*Command) Stderr Uses

func (c *Command) Stderr() io.Writer

Stderr returns a writer that should be used for error messages.



Package cmd imports 58 packages (graph) and is imported by 3 packages. Updated 2020-09-30. Refresh now. Tools for package owners.