helpers

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: May 15, 2018 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	GomeetDefaultPrefixes = "svc-,gomeet-svc-"
)

Variables

This section is empty.

Functions

func Base

func Base(absPath string) string

func ExtractPrefix

func ExtractPrefix(name, prefix string) (string, string)

func GomeetPkg

func GomeetPkg() string

func LastFromSplit

func LastFromSplit(input, split string) string

func Log

func Log(t LogType, msg string)

func NormalizeDefaultPrefixes

func NormalizeDefaultPrefixes(s string) string

func ParseCmd

func ParseCmd(s string) []string

func Path

func Path(inputPath string) (string, error)

Copied and re-worked from https://github.com/spf13/cobra/bl ob/master/cobra/cmd/helpers.go

func SrcPath

func SrcPath() string

Types

type Empty

type Empty struct{}

type LogType

type LogType int
const (
	LogError     LogType = iota - 1 // -1
	LogDangerous                    // 0
	LogSkipping                     // 1
	LogReplacing                    // 2
	LogCreating                     // 3
	LogInfo                         // 4
)

type PkgNfo

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

func NewPkgNfo

func NewPkgNfo(goPkg, defaultPrefixes string) (*PkgNfo, error)

func (PkgNfo) DefaultPrefixes

func (pNfo PkgNfo) DefaultPrefixes() string

func (PkgNfo) GoPkg

func (pNfo PkgNfo) GoPkg() string

func (PkgNfo) Name

func (pNfo PkgNfo) Name() string

func (PkgNfo) Path

func (pNfo PkgNfo) Path() string

func (PkgNfo) Prefix

func (pNfo PkgNfo) Prefix() string

func (PkgNfo) ProjectGroupGoPkg

func (pNfo PkgNfo) ProjectGroupGoPkg() string

func (PkgNfo) ProjectGroupName

func (pNfo PkgNfo) ProjectGroupName() string

func (*PkgNfo) SetDefaultPrefixes

func (pNfo *PkgNfo) SetDefaultPrefixes(s string) error

func (PkgNfo) ShortName

func (pNfo PkgNfo) ShortName() string

Jump to

Keyboard shortcuts

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