statusxgen

package
v1.4.3-poc-rc4 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PkgPath string

Functions

func ParseStatusErrMsg

func ParseStatusErrMsg(s string) (string, bool)

Types

type Generator

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

func New

func New(pkg *pkgx.Pkg) *Generator

func (*Generator) Output

func (g *Generator) Output(cwd string)

func (*Generator) Scan

func (g *Generator) Scan(names ...string)

type Scanner

type Scanner struct {
	StatusErrors map[*types.TypeName][]*statusx.StatusErr
	// contains filtered or unexported fields
}

func NewScanner

func NewScanner(pkg *pkgx.Pkg) *Scanner

func (*Scanner) StatusError

func (s *Scanner) StatusError(tn *types.TypeName) []*statusx.StatusErr

type StatusError

type StatusError struct {
	TypeName *types.TypeName
	Errors   []*statusx.StatusErr
}

func (*StatusError) Name

func (s *StatusError) Name() string

func (*StatusError) SnippetCanBeTalk

func (s *StatusError) SnippetCanBeTalk(f *gen.File) gen.Snippet

func (*StatusError) SnippetCode

func (s *StatusError) SnippetCode(f *gen.File) gen.Snippet

func (*StatusError) SnippetError

func (s *StatusError) SnippetError(f *gen.File) gen.Snippet

func (*StatusError) SnippetKey

func (s *StatusError) SnippetKey(f *gen.File) gen.Snippet

func (*StatusError) SnippetMsg

func (s *StatusError) SnippetMsg(f *gen.File) gen.Snippet

func (*StatusError) SnippetStatusCode

func (s *StatusError) SnippetStatusCode(f *gen.File) gen.Snippet

func (*StatusError) SnippetStatusErr

func (s *StatusError) SnippetStatusErr(f *gen.File) gen.Snippet

func (*StatusError) SnippetTypeAssert

func (s *StatusError) SnippetTypeAssert(f *gen.File) gen.Snippet

func (*StatusError) SnippetUnwrap

func (s *StatusError) SnippetUnwrap(f *gen.File) gen.Snippet

func (*StatusError) WriteToFile

func (s *StatusError) WriteToFile(f *gen.File) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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