legacy

package
v0.4.14 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand(oldcmd *oldcmds.Command) *cmds.Command

NewCommand returns a Command from an oldcmds.Command

func OldContext

func OldContext(env interface{}) *oldcmds.Context

OldContext tries to cast the environment as a legacy command context, returning nil on failure.

Types

type MarshalerEncoder

type MarshalerEncoder struct {
	// contains filtered or unexported fields
}

MarshalerEncoder implements Encoder from a Marshaler

func NewMarshalerEncoder

func NewMarshalerEncoder(req *cmds.Request, m oldcmds.Marshaler, w io.Writer) *MarshalerEncoder

NewMarshalerEncoder returns a new MarshalerEncoder

func (*MarshalerEncoder) Encode

func (me *MarshalerEncoder) Encode(v interface{}) error

Encode encodes v onto the io.Writer w using Marshaler m, with both m and w passed in NewMarshalerEncoder

Jump to

Keyboard shortcuts

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