practice

package
v0.0.0-...-b556d9d Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

README

Go练习册

- 和语言特性相关的一些案例实现,目的是将Go的基础掌握扎实

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

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

func NewApplication

func NewApplication() *Application

func (*Application) Exec

func (app *Application) Exec(ctx context.Context, in base.Input) (out base.Output, err error)

type Input

type Input struct {
	List     bool
	Question string
}

func (*Input) Deserialization

func (in *Input) Deserialization(source []byte) (err error)

func (*Input) From

func (in *Input) From(source base.IPayload) (err error)

func (*Input) Serialization

func (in *Input) Serialization() (target []byte, err error)

func (*Input) To

func (in *Input) To(target base.IPayload) (err error)

type Output

type Output struct {
	Error error
	Data  string
}

func (*Output) Deserialization

func (out *Output) Deserialization(source []byte) (err error)

func (*Output) From

func (out *Output) From(source base.IPayload) (err error)

func (*Output) Serialization

func (out *Output) Serialization() (target []byte, err error)

func (*Output) To

func (out *Output) To(target base.IPayload) (err error)

Jump to

Keyboard shortcuts

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