base

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = &packages.Config{Mode: packages.NeedName}

DefaultConfig for loading Go base.

Functions

func GenerateCmd

func GenerateCmd(postRun ...func(*gen.Config)) *cobra.Command

GenerateCmd returns the generate command for ent/c packages.

func PkgPath

func PkgPath(config *packages.Config, target string) (string, error)

PkgPath returns the Go package name for given target path. Even if the existing path is not exist yet in the filesystem.

If base.Config is nil, DefaultConfig will be used to load base.

Types

type IDType

type IDType field.Type

IDType is a custom ID implementation for pflag.

func (*IDType) Set

func (t *IDType) Set(s string) error

Set implements the Set method of the flag.Value interface.

func (IDType) String

func (IDType) String() string

String returns the default value for the help command.

func (IDType) Type

func (IDType) Type() string

Type returns the type representation of the id option for help command.

Jump to

Keyboard shortcuts

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