util

package
v1.0.31 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 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

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

The slice must be sorted in ascending order

func ContainsString

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

The slice must be sorted in ascending order

func InsertString

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

func NewAccessLevelValue

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

func NewAssigneeIDPtrValue

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

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

func NewReviewerIDPtrValue

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

type Dict []Item

func (Dict) Keys

func (d Dict) Keys() []string

func (Dict) Print

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

func (Dict) Values

func (d Dict) Values() []string

type Item

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