util

package
v1.0.25 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   string = "1.0.0"
	Revision  string
	Branch    string
	BuildUser string
	BuildDate string
	GoVersion = runtime.Version()
)

Build information. Populated at build-time.

Functions

func AskUser

func AskUser(msg string) bool

func BuildContext

func BuildContext() string

BuildContext returns goVersion, buildUser and buildDate information.

func ContainsInt added in v1.0.2

func ContainsInt(slice []int, item int) bool

The slice must be sorted in ascending order

func ContainsString added in v1.0.2

func ContainsString(slice []string, item string) bool

The slice must be sorted in ascending order

func InsertString added in v1.0.11

func InsertString(slice []string, item string) []string

func NewAccessLevelValue added in v1.0.15

func NewAccessLevelValue(p **gitlab.AccessLevelValue) *accessLevelValue

func NewAssigneeIDPtrValue added in v1.0.1

func NewAssigneeIDPtrValue(p **gitlab.AssigneeIDValue) *assigneeIDPtrValue

func NewBoolPtrValue

func NewBoolPtrValue(p **bool) *boolPtrValue

func NewEnumPtrValue

func NewEnumPtrValue(p **string, options ...string) *enumPtrValue

func NewEnumValue

func NewEnumValue(p *string, options ...string) *enumValue

func NewIntPtrValue

func NewIntPtrValue(p **int) *intPtrValue

func NewLabelsPtrValue added in v1.0.1

func NewLabelsPtrValue(p **gitlab.LabelOptions) *labelsPtrValue

func NewReviewerIDPtrValue added in v1.0.1

func NewReviewerIDPtrValue(p **gitlab.ReviewerIDValue) *reviewerIDPtrValue

func NewStringPtrValue

func NewStringPtrValue(p **string) *stringPtrValue

func NewTimePtrValue

func NewTimePtrValue(p **time.Time) *timePtrValue

func NewVisibilityPtrValue

func NewVisibilityPtrValue(p **gitlab.VisibilityValue) *visibilityPtrValue

func PrintVersion

func PrintVersion(program string) string

Print returns version information.

func VersionInfo

func VersionInfo() string

Info returns version, branch and revision information.

func VersionString

func VersionString() string

Types

type Dict added in v1.0.8

type Dict []Item

func (Dict) Keys added in v1.0.8

func (d Dict) Keys() []string

func (Dict) Print added in v1.0.8

func (d Dict) Print(w io.Writer, sep string, args ...interface{}) error

func (Dict) Values added in v1.0.8

func (d Dict) Values() []string

type Item added in v1.0.8

type Item struct {
	Key   string
	Value string
}

Jump to

Keyboard shortcuts

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