utils

package
v0.0.0-...-04082a4 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VersionGreater = 1
	VersionEqual   = 0
	VersionLess    = -1
	VersionInvalid = -2
)

Variables

This section is empty.

Functions

func AppendJsonSlice

func AppendJsonSlice(jsonArr string, key string) string

func AppendSlice

func AppendSlice(ids []string, key string) []string

func CompareVersions

func CompareVersions(newVersion, oldVersion string) int

版本号比较

func IsExistJsonSlice

func IsExistJsonSlice(jsonArr string, key string) bool

func IsExistSlice

func IsExistSlice(ids []string, key string) bool

func IsValidVersion

func IsValidVersion(version string) bool

Validate if version is valid or not Valid version could be V1.0, V1.2.3, or V1.2.3.4

func JoinArray

func JoinArray(arr []string) string

[a,b,c] -> a, b, c

func JoinArrayBracket

func JoinArrayBracket(params []string) string

数组 [a, b, c] 转换为字符串 a<b<c>>

func RemoveDuplicates

func RemoveDuplicates(input []string) []string

删除数组中的重复元素

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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