util

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FLAG_ORDER_DESC = "desc"
	FLAG_ORDER_ASC  = "asc"

	FLAG_SORT   = "sort"
	FLAG_SORT_P = "s"

	FLAG_SEARCH   = "search"
	FLAG_SEARCH_P = "q"

	FLAG_LIMIT   = "limit"
	FLAG_LIMIT_P = "l"

	FLAG_OFFSET   = "offset"
	FLAG_OFFSET_P = "o"

	FLAG_PAGE   = "page"
	FLAG_PAGE_P = "p"

	FLAG_FILTER_TARGET_VERSION_ID = "target_id"

	FLAG_FILTER_STATUS_ID = "status_id"
	FLAG_JSON             = "json"
)

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(cmd *cobra.Command)

func CheckID

func CheckID(id string) bool

func Contains

func Contains(s []string, e string) bool

func ParseFlags

func ParseFlags(cmd *cobra.Command, projectID int, sortFields []string) string

func TimeAgo

func TimeAgo(data string) string

Types

type Errors

type Errors struct {
	Errors []string `json:"errors,omitempty"`
}

type Id

type Id struct {
	ID int `json:"id,omitempty"`
}

type IdName

type IdName struct {
	ID   int    `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

Jump to

Keyboard shortcuts

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