💪 Helper Utils For The Go: string, array/slice, map, format, cli, env, filesystem, test and more.

Overview

Go Util

GitHub go.mod Go version GitHub tag (latest SemVer) GoDoc Go Report Card Unit-Tests Coverage Status

💪 Useful utils for the Go: string, array/slice, map, format, CLI, ENV, filesystem, testing and more.

  • arrutil array/slice util functions
  • dump Simple variable printing tool, printing slice, map will automatically wrap each element and display the call location
  • cliutil CLI util functions
  • envutil ENV util for check current runtime env information
  • fmtutil format data util functions
  • fsutil filesystem util functions
  • jsonutil JSON util functions
  • maputil map util functions
  • mathutil math util functions
  • netutil network util functions
  • strutil string util functions
  • testutil test help util functions

中文说明

GoDoc

Packages

Array/Slice

Package github.com/gookit/goutil/arrutil

// source at arrutil/arrutil.go
func Reverse(ss []string)
func StringsRemove(ss []string, s string) []string
func TrimStrings(ss []string, cutSet ...string) (ns []string)
func GetRandomOne(arr interface{}) interface{}
// source at arrutil/check.go
func IntsHas(ints []int, val int) bool
func Int64sHas(ints []int64, val int64) bool
func StringsHas(ss []string, val string) bool
func HasValue(arr, val interface{}) bool
func Contains(arr, val interface{}) bool
func NotContains(arr, val interface{}) bool
// source at arrutil/convert.go
func ToInt64s(arr interface{})(ret []int64, err error)
func MustToInt64s(arr interface{}) []int64
func SliceToInt64s(arr []interface{}) []int64
func ToStrings(arr interface{})(ret []string, err error)
func MustToStrings(arr interface{}) []string
func SliceToStrings(arr []interface{}) []string
func StringsToInts(ss []string) (ints []int, err error)

CLI

Package github.com/gookit/goutil/cliutil

// source at cliutil/cliutil.go
func LineBuild(binFile string, args []string) string
func BuildLine(binFile string, args []string) string
func String2OSArgs(line string) []string
func StringToOSArgs(line string) []string
func ParseLine(line string) []string
func QuickExec(cmdLine string, workDir ...string) (string, error)
func ExecLine(cmdLine string, workDir ...string) (string, error)
func ExecCmd(binName string, args []string, workDir ...string) (string, error)
func ExecCommand(binName string, args []string, workDir ...string) (string, error)
func ShellExec(cmdLine string, shells ...string) (string, error)
func CurrentShell(onlyName bool) (path string)
func HasShellEnv(shell string) bool
// source at cliutil/read.go
func ReadInput(question string) (string, error)
func ReadLine(question string) (string, error)
func ReadFirst(question string) (string, error)
func ReadFirstByte(question string) (byte, error)
func ReadFirstRune(question string) (rune, error)
// source at cliutil/read_nonwin.go
func ReadPassword(question ...string) string

Examples

cmdline parse:

package main

import (
	"fmt"

	"github.com/gookit/goutil/cliutil"
	"github.com/gookit/goutil/dump"
)

func main() {
	args := cliutil.ParseLine(`./app top sub --msg "has multi words"`)
	dump.P(args)

	s := cliutil.BuildLine("./myapp", []string{
		"-a", "val0",
		"-m", "this is message",
		"arg0",
	})
	fmt.Println("Build line:", s)
}

output:

PRINT AT github.com/gookit/goutil/cliutil_test.TestParseLine(line_parser_test.go:30)
[]string [ #len=5
  string("./app"), #len=5
  string("top"), #len=3
  string("sub"), #len=3
  string("--msg"), #len=5
  string("has multi words"), #len=15
]

Build line: ./myapp -a val0 -m "this is message" arg0

Dump

Package github.com/gookit/goutil/dump

// source at dump/dump.go
func Std() *Dumper
func Reset()
func Config(fn func(opts *Options))
func Print(vs ...interface{})
func Println(vs ...interface{})
func Fprint(w io.Writer, vs ...interface{})
// source at dump/dumper.go
func NewDumper(out io.Writer, skip int) *Dumper
func NewDefaultOptions(out io.Writer, skip int) *Options

Examples

example code:

10 map[string]interface{}{ "key": "val", "sub": map[string]string{"k": "v"}, }, struct { ab string Cd int }{ "ab", 23, }, ) } ">
package main

import "github.com/gookit/goutil/dump"

// rum demo:
// 	go run ./dump/_examples/demo1.go
func main() {
	otherFunc1()
}

func otherFunc1() {
	dump.P(
		23,
		[]string{"ab", "cd"},
		[]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, // len > 10
		map[string]interface{}{
			"key": "val", "sub": map[string]string{"k": "v"},
		},
		struct {
			ab string
			Cd int
		}{
			"ab", 23,
		},
	)
}

Preview:

nested struct

source code at dump/dumper_test.TestStruct_WithNested

ENV

Package github.com/gookit/goutil/envutil

// source at envutil/envutil.go
func VarParse(str string) string
func ParseEnvValue(val string) (newVal string)
// source at envutil/get.go
func Getenv(name string, def ...string) string
// source at envutil/info.go
func IsWin() bool
func IsWindows() bool
func IsMac() bool
func IsLinux() bool
func IsMSys() bool
func IsWSL() bool
func IsTerminal(fd uintptr) bool
func StdIsTerminal() bool
func IsConsole(out io.Writer) bool
func HasShellEnv(shell string) bool
func IsSupportColor() bool
func IsSupport256Color() bool
func IsSupportTrueColor() bool

Formatting

Package github.com/gookit/goutil/fmtutil

// source at fmtutil/format.go
func DataSize(bytes uint64) string
func PrettyJSON(v interface{}) (string, error)
func StringsToInts(ss []string) (ints []int, err error)
func ArgsWithSpaces(args []interface{}) (message string)
// source at fmtutil/time.go
func HowLongAgo(sec int64) string

FileSystem

Package github.com/gookit/goutil/fsutil

// source at fsutil/check.go
func Dir(fpath string) string
func Name(fpath string) string
func FileExt(fpath string) string
func Suffix(fpath string) string
func PathExists(path string) bool
func IsDir(path string) bool
func FileExists(path string) bool
func IsFile(path string) bool
func IsAbsPath(aPath string) bool
func IsImageFile(path string) bool
func IsZipFile(filepath string) bool
// source at fsutil/finder.go
func EmptyFinder() *FileFinder
func NewFinder(dirPaths []string, filePaths ...string) *FileFinder
func ExtFilterFunc(exts []string, include bool) FileFilterFunc
func SuffixFilterFunc(suffixes []string, include bool) FileFilterFunc
func PathNameFilterFunc(names []string, include bool) FileFilterFunc
func DotFileFilterFunc(include bool) FileFilterFunc
func ModTimeFilterFunc(limitSec int, op rune, include bool) FileFilterFunc
func GlobFilterFunc(patterns []string, include bool) FileFilterFunc
func RegexFilterFunc(pattern string, include bool) FileFilterFunc
func DotDirFilterFunc(include bool) DirFilterFunc
func DirNameFilterFunc(names []string, include bool) DirFilterFunc
// source at fsutil/fsutil.go
func OSTempFile(pattern string) (*os.File, error)
func TempFile(dir, pattern string) (*os.File, error)
func OSTempDir(pattern string) (string, error)
func TempDir(dir, pattern string) (string, error)
func ExpandPath(path string) string
func MimeType(path string) (mime string)
func ReaderMimeType(r io.Reader) (mime string)
// source at fsutil/operate.go
func Mkdir(dirPath string, perm os.FileMode) error
func MkParentDir(fpath string) error
func MustReadFile(filePath string) []byte
func ReadExistFile(filePath string) []byte
func OpenFile(filepath string, flag int, perm os.FileMode) (*os.File, error)
func QuickOpenFile(filepath string) (*os.File, error)
func CreateFile(fpath string, filePerm, dirPerm os.FileMode) (*os.File, error)
func MustCreateFile(filePath string, filePerm, dirPerm os.FileMode) *os.File
func CopyFile(src string, dst string) error
func MustCopyFile(src string, dst string)
func MustRemove(fpath string)
func QuietRemove(fpath string)
func DeleteIfExist(fpath string) error
func DeleteIfFileExist(fpath string) error
func Unzip(archive, targetDir string) (err error)

Examples

files finder:

", fi.ModTime()) }) } ">
package main

import (
	"fmt"
	"os"

	"github.com/gookit/goutil/fsutil"
)

func main() {
	f := fsutil.EmptyFinder()

	f.
		AddDir("./testdata").
		AddFile("finder.go").
		NoDotFile().
		// NoDotDir().
		Find().
		Each(func(filePath string) {
			fmt.Println(filePath)
		})

	fsutil.NewFinder([]string{"./testdata"}).
		AddFile("finder.go").
		NoDotDir().
		EachStat(func(fi os.FileInfo, filePath string) {
			fmt.Println(filePath, "=>", fi.ModTime())
		})
}

JSON

Package github.com/gookit/goutil/jsonutil

// source at jsonutil/jsonutil.go
func WriteFile(filePath string, data interface{}) error
func ReadFile(filePath string, v interface{}) error
func Encode(v interface{}) ([]byte, error)
func Decode(json []byte, v interface{}) error
func Pretty(v interface{}) (string, error)
func StripComments(src string) string

Map

Package github.com/gookit/goutil/maputil

// source at maputil/convert.go
func KeyToLower(src map[string]string) map[string]string
func ToStringMap(src map[string]interface{}) map[string]string
func HttpQueryString(data map[string]interface{}) string
// source at maputil/maputil.go
func MergeStringMap(src, dst map[string]string, ignoreCase bool) map[string]string
func GetByPath(key string, mp map[string]interface{}) (val interface{}, ok bool)
func Keys(mp interface{}) (keys []string)
func Values(mp interface{}) (values []interface{})

Math/Number

Package github.com/gookit/goutil/mathutil

// source at mathutil/convert.go
func Int(in interface{}) (int, error)
func MustInt(in interface{}) int
func ToInt(in interface{}) (iVal int, err error)
func Uint(in interface{}) (uint64, error)
func MustUint(in interface{}) uint64
func ToUint(in interface{}) (u64 uint64, err error)
func Int64(in interface{}) (int64, error)
func MustInt64(in interface{}) int64
func ToInt64(in interface{}) (i64 int64, err error)
func Float(in interface{}) (float64, error)
func ToFloat(in interface{}) (f64 float64, err error)
func MustFloat(in interface{}) float64
// source at mathutil/number.go
func IsNumeric(c byte) bool
func Percent(val, total int) float64
func ElapsedTime(startTime time.Time) string
func DataSize(size uint64) string
func HowLongAgo(sec int64) string
// source at mathutil/random.go
func RandomInt(min, max int) int

Struct

Package github.com/gookit/goutil/structs

// source at structs/alias.go
func NewAliases(checker func(alias string)) *Aliases
// source at structs/tags.go
func ParseTags(v interface{}) error
func ParseReflectTags(v reflect.Value) error

String

Package github.com/gookit/goutil/strutil

// source at strutil/check.go
func IsNumeric(c byte) bool
func IsAlphabet(char uint8) bool
func IsAlphaNum(c uint8) bool
func StrPos(s, sub string) int
func BytePos(s string, bt byte) int
func RunePos(s string, ru rune) int
func IsStartOf(s, sub string) bool
func IsEndOf(s, sub string) bool
func Len(s string) int
func Utf8len(s string) int
func ValidUtf8String(s string) bool
func IsSpace(c byte) bool
func IsSpaceRune(r rune) bool
func IsBlank(s string) bool
func IsBlankBytes(bs []byte) bool
func IsSymbol(r rune) bool
// source at strutil/convert.go
func String(val interface{}) (string, error)
func MustString(in interface{}) string
func ToString(val interface{}) (str string, err error)
func AnyToString(val interface{}, defaultAsErr bool) (str string, err error)
func ToBool(s string) (bool, error)
func MustBool(s string) bool
func Bool(s string) (bool, error)
func Int(s string) (int, error)
func ToInt(s string) (int, error)
func MustInt(s string) int
func ToInts(s string, sep ...string) ([]int, error)
func ToIntSlice(s string, sep ...string) (ints []int, err error)
func ToArray(s string, sep ...string) []string
func ToSlice(s string, sep ...string) []string
func ToOSArgs(s string) []string
func ToTime(s string, layouts ...string) (t time.Time, err error)
// source at strutil/encode.go
func Base64(str string) string
func B64Encode(str string) string
func URLEncode(s string) string
func URLDecode(s string) string
// source at strutil/find_similar.go
func NewComparator(src, dst string) *SimilarComparator
func Similarity(s, t string, rate float32) (float32, bool)
// source at strutil/format.go
func Lowercase(s string) string
func Uppercase(s string) string
func UpperWord(s string) string
func LowerFirst(s string) string
func UpperFirst(s string) string
func Snake(s string, sep ...string) string
func SnakeCase(s string, sep ...string) string
func Camel(s string, sep ...string) string
func CamelCase(s string, sep ...string) string
// source at strutil/id.go
func MicroTimeID() string
func MicroTimeHexID() string
// source at strutil/random.go
func Md5(src interface{}) string
func GenMd5(src interface{}) string
func RandomChars(ln int) string
func RandomCharsV2(ln int) string
func RandomCharsV3(ln int) string
func RandomBytes(length int) ([]byte, error)
func RandomString(length int) (string, error)
// source at strutil/strutil.go
func Trim(s string, cutSet ...string) string
func TrimLeft(s string, cutSet ...string) string
func TrimRight(s string, cutSet ...string) string
func FilterEmail(s string) string
func Split(s, sep string) (ss []string)
func Substr(s string, pos, length int) string
func Padding(s, pad string, length int, pos uint8) string
func PadLeft(s, pad string, length int) string
func PadRight(s, pad string, length int) string
func Repeat(s string, times int) string
func RepeatRune(char rune, times int) (chars []rune)
func RepeatBytes(char byte, times int) (chars []byte)
func Replaces(str string, pairs map[string]string) string
func PrettyJSON(v interface{}) (string, error)
func RenderTemplate(input string, data interface{}, fns template.FuncMap, isFile ...bool) string
func RenderText(input string, data interface{}, fns template.FuncMap, isFile ...bool) string

System

Package github.com/gookit/goutil/sysutil

// source at sysutil/exec.go
func QuickExec(cmdLine string, workDir ...string) (string, error)
func ExecLine(cmdLine string, workDir ...string) (string, error)
func ExecCmd(binName string, args []string, workDir ...string) (string, error)
func ShellExec(cmdLine string, shells ...string) (string, error)
func FindExecutable(binName string) (string, error)
func Executable(binName string) (string, error)
func HasExecutable(binName string) bool
// source at sysutil/sysenv.go
func UserHomeDir() string
func HomeDir() string
func ExpandPath(path string) string
func Hostname() string
func IsWin() bool
func IsWindows() bool
func IsMac() bool
func IsLinux() bool
func IsMSys() bool
func IsConsole(out io.Writer) bool
func IsTerminal(fd uintptr) bool
func StdIsTerminal() bool
func CurrentShell(onlyName bool) (path string)
func HasShellEnv(shell string) bool
func IsShellSpecialVar(c uint8) bool
// source at sysutil/sysutil_nonwin.go
func Kill(pid int, signal syscall.Signal) error
func ProcessExists(pid int) bool

Testing

Package github.com/gookit/goutil/testutil

// source at testutil/httpmock.go
func NewHttpRequest(method, path string, data *MD) *http.Request
func MockRequest(h http.Handler, method, path string, data *MD) *httptest.ResponseRecorder
// source at testutil/testutil.go
func DiscardStdout() error
func ReadOutput() (s string)
func RewriteStdout()
func RestoreStdout() (s string)
func RewriteStderr()
func RestoreStderr() (s string)
func MockEnvValue(key, val string, fn func(nv string))
func MockEnvValues(kvMap map[string]string, fn func())

Code Check & Testing

gofmt -w -l ./
golint ./...
go test ./...

Gookit packages

  • gookit/ini Go config management, use INI files
  • gookit/rux Simple and fast request router for golang HTTP
  • gookit/gcli Build CLI application, tool library, running CLI commands
  • gookit/slog Lightweight, easy to extend, configurable logging library written in Go
  • gookit/color A command-line color library with true color support, universal API methods and Windows support
  • gookit/event Lightweight event manager and dispatcher implements by Go
  • gookit/cache Generic cache use and cache manager for golang. support File, Memory, Redis, Memcached.
  • gookit/config Go config management. support JSON, YAML, TOML, INI, HCL, ENV and Flags
  • gookit/filter Provide filtering, sanitizing, and conversion of golang data
  • gookit/validate Use for data validation and filtering. support Map, Struct, Form data
  • gookit/goutil Some utils for the Go: string, array/slice, map, format, cli, env, filesystem, test and more
  • More, please see https://github.com/gookit

License

MIT

Issues
  • Add new functions for arrutil #44

    Add new functions for arrutil #44

    #44

    function | comment | unit tests | benchmark ----|----|----|---- arrutil.TwowaySearch | Find specialized element in a slice forward and backward in the same time, should be more quicker. | yes | no arrutil.Excepts | Produces the set difference of two slice according to a comparer function | yes | no arrutil.Intersects | Produces the intersect of two slice according to a comparer function | yes | no arrutil.Union | Produces the set union of two slice according to a comparer function | yes | no arrutil.Find | Produces the struct/value of a slice according to a predicate function | yes | no arrutil.FindOrDefault | Produce the struct/value f a slice to a predicate function, produce default value when predicate function not match | yes | no arrutil.TakeWhile | Produce the set of a slice according to a predicate function, produce empty slice when predicate function not match | yes | no arrutil.ExceptWhile | Produce the set of a slice except with a predicate function, produce original slice when predicate function not match | yes | no

    enhancement 
    opened by ah-its-andy 5
  • 在windows平台下,编译报错

    在windows平台下,编译报错

    windows平台下,在使用github.com/gookit/color和github.com/gookit/gcli/v2/interact时 ,因为依赖了该包, 报了异常undefined sysutil.IsConsole, sysutil.IsMSys, sysutil.HasShellEnv,启用了go mod,我尝试删除了所有go mod缓存,并且重新编译,但还是报了上述错误。


    查阅了源代码,发现sysutil/sysutil.go文件头部有条 // +build !windows 代码,表示winodws下该文件不会编译,是表示该包只能在非windows下使用吗?

    opened by lightbrotherV 3
  • Bump honnef.co/go/tools from 0.0.1-2020.1.4 to 0.0.1-2020.1.5

    Bump honnef.co/go/tools from 0.0.1-2020.1.4 to 0.0.1-2020.1.5

    Bumps honnef.co/go/tools from 0.0.1-2020.1.4 to 0.0.1-2020.1.5.

    Commits
    • e6faca5 Version 2020.1.5
    • ce9d960 Add 2020.1.5 release notes
    • e18389c pattern: support matching field lists
    • 276c3dd staticcheck: don't flag nil constants as useless assignments
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

    You can always request more updates by clicking Bump now in your Dependabot dashboard.

    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 2
  • Supports for slices in mapuitl.go

    Supports for slices in mapuitl.go

    I've been seeing and developing an improvement so that the GetByPath function supports access to slice structures.

    I added the following tests in TestGetByPath and they pass successfully.

            //...
    
            v, ok = maputil.GetByPath("key2", mp)
    	assert.True(t, ok)
    	assert.Equal(t, mp["key2"], v)
    
    	v, ok = maputil.GetByPath("key2.0", mp)
    	assert.True(t, ok)
    	assert.Equal(t, "sv1", v)
    
    	v, ok = maputil.GetByPath("key2.1", mp)
    	assert.True(t, ok)
    	assert.Equal(t, "sv2", v)
    
    	v, ok = maputil.GetByPath("key4.0", mp)
    	assert.True(t, ok)
    	assert.Equal(t, 1, v)
    
    	v, ok = maputil.GetByPath("key4.1", mp)
    	assert.True(t, ok)
    	assert.Equal(t, 2, v)
    
    	v, ok = maputil.GetByPath("key5.0", mp)
    	assert.True(t, ok)
    	assert.Equal(t, 1, v)
    
    	v, ok = maputil.GetByPath("key5.1", mp)
    	assert.True(t, ok)
    	assert.Equal(t, "2", v)
    
    	v, ok = maputil.GetByPath("key5.2", mp)
    	assert.True(t, ok)
    	assert.Equal(t, true, v)
    
    	// Out of bound value
    	v, ok = maputil.GetByPath("key2.2", mp)
    	assert.False(t, ok)
    	assert.Nil(t, v)
    
            //...
    
    opened by JuanigTorres 1
  • Bump github.com/gookit/color from 1.4.0 to 1.4.1

    Bump github.com/gookit/color from 1.4.0 to 1.4.1

    Bumps github.com/gookit/color from 1.4.0 to 1.4.1.

    Commits
    • d37380a update readme
    • bea68e7 up: fallback on terminfo load error, simple detect by TERM value string
    • 350627c up: support disable color by NO_COLOR env
    • 22ba06a add an new method for Style
    • ba01605 update some for examples
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump github.com/gookit/color from 1.3.7 to 1.3.8

    Bump github.com/gookit/color from 1.3.7 to 1.3.8

    Bumps github.com/gookit/color from 1.3.7 to 1.3.8.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump github.com/gookit/color from 1.3.2 to 1.3.3

    Bump github.com/gookit/color from 1.3.2 to 1.3.3

    Bumps github.com/gookit/color from 1.3.2 to 1.3.3.

    Release notes

    Sourced from github.com/gookit/color's releases.

    v1.3.3

    • feat: add func (RGBColor) C16() Color
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump github.com/stretchr/testify from 1.3.0 to 1.6.1

    Bump github.com/stretchr/testify from 1.3.0 to 1.6.1

    Bumps github.com/stretchr/testify from 1.3.0 to 1.6.1.

    Release notes

    Sourced from github.com/stretchr/testify's releases.

    Fixes breaking change with HTTPBodyContains

    A breaking change was accidentally released in v1.6.0 which breaks the API for the HTTPBodyContains and HTTPBodyNotContains, this release reverts that change.

    v1.6.0

    Latest release of testify. This includes many fixes and enhancements. Please view the v1.6.0 milestone for a list of changes.

    HOTFIX: Revert suite interface type

    This is a hotfix which reverts the suite package's interface type to use testing.T

    v1.5.0

    Latest, non-breaking changes merged into master. Please peruse the git log for a detailed changelist

    v1.4.0

    The 1.4.0 release includes new matchers and bug fixes. See the v.1.4.0 milestone for a complete list of closed issues associated with this release.

    Commits
    • f654a91 Update Go versions in Travis
    • 3184a9e This reverts commit 0a813b5898c0ee8d00b4f13fae21ea5df8b35e74.
    • e2b269e This reverts commit 2adb7b54b75da2c74e9342ed115957fe0b07e0b4.
    • 6353e56 This reverts commit 9d083cac4a26c76f8d92dff41d459f3f2fc0b911.
    • 6561324 This reverts commit 484fff1ace1f0acb84676a548b53477685c16414.
    • 46420cf This reverts commit 1a43b8334acb9df58064b765cd16675cc7c2c8b3.
    • 303198d Revert "allow body for HTTPBodyContains and HTTPBodyNotContains for
    • e7cc868 Update TravisCI config
    • 004e3cb commit generated files
    • ac1463f Implement NotEqualValues
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

    You can always request more updates by clicking Bump now in your Dependabot dashboard.

    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 1
  • Bump github.com/gookit/color from 1.2.6 to 1.2.7

    Bump github.com/gookit/color from 1.2.6 to 1.2.7

    Bumps github.com/gookit/color from 1.2.6 to 1.2.7.

    Release notes

    Sourced from github.com/gookit/color's releases.

    v1.2.7

    • update readme
    • update deps
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

    You can always request more updates by clicking Bump now in your Dependabot dashboard.

    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 1
  • build(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0

    build(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0

    Bumps github.com/stretchr/testify from 1.7.5 to 1.8.0.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 0
  • build(deps): bump github.com/stretchr/testify from 1.7.4 to 1.7.5

    build(deps): bump github.com/stretchr/testify from 1.7.4 to 1.7.5

    Bumps github.com/stretchr/testify from 1.7.4 to 1.7.5.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 0
  • Concurrency issues in  Dumper

    Concurrency issues in Dumper

    System (please complete the following information):

    • OS: linux, macOS
    • GO Version: 1.18
    • Pkg Version: 0.5.5

    Describe the bug

    &fatal error: concurrent map read and map write
    
    
    To see all goroutines, visit https://github.com/maruel/panicparse#gotraceback
    
    1: running
        runtime :0 throw()
    runtime.throw({0x10490cd05, 0x21})
            /usr/local/go/src/runtime/panic.go:1198 +0x54 fp=0x140003dfa70 sp=0x140003dfa40 pc=0x1046d9c34
    runtime.mapaccess2(0x104997d80, 0x1400044c3f0, 0x140003dfaf0)
            /usr/local/go/src/runtime/map.go:469 +0x228 fp=0x140003dfab0 sp=0x140003dfa70 pc=0x1046b31f8
    github.com/gookit/goutil/dump.(*Dumper).checkCyclicRef(0x14000146180, {0x1049f0bd0, 0x1049d2980}, {0x1049d2980, 0x14000384420, 0x199})
            /{$GOPATH}/pkg/mod/github.com/gookit/[email protected]/dump/dumper.go:403 +0x6c fp=0x140003dfb30 sp=0x140003dfab0 pc=0x1047c8bcc
    github.com/gookit/goutil/dump.(*Dumper).printRValue(0x14000146180, {0x1049f0bd0, 0x10497f860}, {0x10497f860, 0x14000384420, 0x16})
            /{$GOPATH}/pkg/mod/github.com/gookit/[email protected]/dump/dumper.go:309 +0x121c fp=0x140003dfeb0 sp=0x140003dfb30 pc=0x1047c799c
    github.com/gookit/goutil/dump.(*Dumper).printOne(0x14000146180, {0x10497f860, 0x14000384420})
            /{$GOPATH}/pkg/mod/github.com/gookit/[email protected]/dump/dumper.go:229 +0x118 fp=0x140003dff30 sp=0x140003dfeb0 pc=0x1047c6718
    github.com/gookit/goutil/dump.(*Dumper).dump(0x14000146180, {0x140003dffa8, 0x1, 0x1})
            /{$GOPATH}/pkg/mod/github.com/gookit/[email protected]/dump/dumper.go:171 +0x120 fp=0x140003dff80 sp=0x140003dff30 pc=0x1047c5e20
    github.com/gookit/goutil/dump.(*Dumper).Println(...)
            /{$GOPATH}/pkg/mod/github.com/gookit/[email protected]/dump/dumper.go:136
    github.com/gookit/goutil/dump.Println(...)
            /{$GOPATH}/pkg/mod/github.com/gookit/[email protected]/dump/dump.go:96
    main.(*SimpleTradeSpi).OnRtnTrade(0x104bdd850, 0x14000384420)
            /{$GOPATH}/sample/main.go:274 +0x5c fp=0x140003dffc0 sp=0x140003dff80 pc=0x10490021c
    runtime.goexit()
            /usr/local/go/src/runtime/asm_arm64.s:1133 +Failed: failed to parse int on line: "runtime.throw({0x10490cd05, 0x21})"
    

    出错位置:

    func (d *Dumper) checkCyclicRef(t reflect.Type, v reflect.Value) (goon bool) {
    	addr := v.UnsafeAddr()
    	vis := visit{addr, t}
    
    	if vd, ok := d.visited[vis]; ok && vd < d.MaxDepth { <------- here
    		d.indentPrint(t.String(), "{(!CYCLIC REFERENCE!)}\n")
    		return false // don't print v again
    	}
    
    	// record
    	d.visited[vis] = d.curDepth
    	return true
    }
    
    bug 
    opened by pseudocodes 2
  • feat: get map diff

    feat: get map diff

    Diff get a map record the difference between the two maps.

    The calculation is based on a map change to b map if deleted some field in a map then the field will be returned in result field same key but is nil value.

     a map {"a":"a","b":"b"}
     b map {"b":"b","c":"c"}
     return map {"a":nil,"c":"c"}
    

    close: https://github.com/gookit/goutil/issues/48

    opened by uptutu 1
  • [proposal] maputil add func diff(amap, bmap) return difference fields

    [proposal] maputil add func diff(amap, bmap) return difference fields

    A recent task was to compare two json strings and find the field that had been modified.

    I converted them into two map[string]interface data and write a func diff(a, b map[string]interface{}) to find the changed fields.

    I'd like PR this func to maputil later. hope it can help more people who need it.

    opened by uptutu 0
  • Dump: Can dump provide a parameter to control nil/zero not to print?

    Dump: Can dump provide a parameter to control nil/zero not to print?

    Example:

    type T1 struct {
    	T2 *T2
    	T3 *T3
    }
    
    type T2 struct {
    	Name2 string
    }
    
    type T3 struct {
    	Name3 string
    }
    
    func main() {
    	t1 := &T1{
    		T2: &T2{
    			Name2: "xx",
    		},
    	}
    	dump.P(t1)
    }
    

    output:

    PRINT AT main.main(main.go:27)
    &main.T1 {
      T2: &main.T2 {
        Name2: string("xx"), #len=2
      },
      T3: *main.T3<nil>,
    }
    

    i want to ignore T3: *main.T3<nil>

    suggestion 
    opened by lx-world 1
Releases(v0.5.7)
  • v0.5.7(Jul 11, 2022)

    Change Log

    Fixed

    • fix: sysutil - read clipboard contents not works on Windows https://github.com/gookit/goutil/commit/cd05caec0fd502491ddda8d6283cf254ca523145
    • fix: sysutil - read clipboard at Windows, will always return end of the \r\n https://github.com/gookit/goutil/commit/f3fc7130c4a8ea4def3eac3b8265c2b617f3c6ed

    Feature

    • feat: maputil - add HasKey() for check map key exists https://github.com/gookit/goutil/commit/e2407570bbe0f19b2d672c576db0e504bf183639
    • feat: stdutil - add new check util func IsEqual(),IsContains() https://github.com/gookit/goutil/commit/69a0c612ee25989f1a003df62a548a5e1348a2ad
    • feat: testutil/assert - add new assert util func Contains(), NotContains() https://github.com/gookit/goutil/commit/40b2f44d03f5bf873f410a11238a62ef5a762144
    • feat: arrutil - add new util func StringsFilter() https://github.com/gookit/goutil/commit/71b3271518a4dc51245533e5c413a87a43e0e946

    Update

    • up: cflag - update the command args binding logic https://github.com/gookit/goutil/commit/6d8c891a132eb1f59b81c6b90ff638d177e49c1a
    • up: testutil/assert - update some assert func logic https://github.com/gookit/goutil/commit/233578fe7f6d96bed6e7f516ea145825f983044f
    • up: cflag - add a new util func FilterNames() https://github.com/gookit/goutil/commit/baca9d54a7a1c9bc90cd3e750974610bcde51e96

    Other

    • chore: update cflag readme and update ./README https://github.com/gookit/goutil/commit/a70984fc1db3b83af85c81f7391a676dc00fe81a
    • chore: update the cflag readme usage docs https://github.com/gookit/goutil/commit/3cbc5d7088bfe8bec689ceb1d5d065bb1a7e8040
    Source code(tar.gz)
    Source code(zip)
  • v0.5.6(Jul 8, 2022)

    Change Log

    Fixed

    • fix: std - fix value len check error on input ptr value https://github.com/gookit/goutil/commit/59add301b94d8091c461169baeca88b5de4297f3
    • fix: sysutil - build error on Windows https://github.com/gookit/goutil/commit/efde7583e5da6c13c847eda80f435db43bc2c4e8
    • fix: dump - add a read lock on record visit logs, issues: #54 https://github.com/gookit/goutil/commit/efbd2b004ca94b03047d6015171449b2571f69aa

    Feature

    • new: add cliutil.SuccessX method for print success style message https://github.com/gookit/goutil/commit/be9eb6fc3b6f8762aadb8d7430a9c42003d907ef
    • feat: sysutil - add OpenBrowser for open URL on default browser https://github.com/gookit/goutil/commit/81a9a29a97cdaa4b36af701b37b9321d5c75bd47
    • feat: strutil - add *Slashes func for encode given string https://github.com/gookit/goutil/commit/f1b1226daa94a89e519ec9db65ff3d00d548222f
    • feat: sysutil - add new sub pkg clipboard for operate OS Clipboard https://github.com/gookit/goutil/commit/11ef857548c5f679fb539cbade5b30381617a12a
    • feat: testutil/assert - add all assert func to Assertions struct as method https://github.com/gookit/goutil/commit/ee629c552b3e3b0f72d94a824a92810e15d755b6

    Update

    • up: add new methods for reflects.Value and add some tests https://github.com/gookit/goutil/commit/18bf238a92b1cf0454979cdda7e6912f91c805f2
    • up: reflects - add some new util func and with more unit tests https://github.com/gookit/goutil/commit/1b71758439e76c775a2cc8526310feb7ff0297ef
    • up: test - add a wraps bytes buffer for tests https://github.com/gookit/goutil/commit/491a8efc69f242100458e40cc48e003928d08972
    • up: add some new stdio util func for quiet print data https://github.com/gookit/goutil/commit/9b092efbc42419279ee855d95f4d86bd52378121
    • up: testutil - update some test util func and add readme https://github.com/gookit/goutil/commit/91783dab90c442e52c53415caa0208fb84d706e7
    • up: update some common info, add internal/gencode cmd https://github.com/gookit/goutil/commit/8946f2460e78814f70d86e81b9b2fde91dffd78c
    • up: reflects - add more reflact util functions https://github.com/gookit/goutil/commit/1047e054480f8b898c20b6bf0751761918dfd8ae
    • up: sysutil - add stack info fetch func and add readme https://github.com/gookit/goutil/commit/47e8fc6c064bb029fdc6ebee553016ab50254c24
    • up: strutil - fix an error for str repeat func https://github.com/gookit/goutil/commit/079a35db7003b6933c118028620cc3fcdd3232f8
    • up: stdutil - update some std util func logic https://github.com/gookit/goutil/commit/557aa479a42e5303fdd3240b04cd8c6a010494e4
    • up: testutil - add new sub pkg: assert for help the unit testing https://github.com/gookit/goutil/commit/1a5208eac749a2000a11147877766143fedc0775
    • up: clipboard - update some read/write file error, add more unit tests https://github.com/gookit/goutil/commit/442caea5d7ae00ae4931f5137a09f61073e6e710
    • up: sysutil - add more unit tests for find exec file https://github.com/gookit/goutil/commit/a3184d354a0cb65d626f821893b706704538df9e
    • up: assert - add more assert test util functions https://github.com/gookit/goutil/commit/08cd71c019e8efdf83e482b4686a6b99b66b84fa
    • up: str,timex - add ToDuration func for parse string to duration https://github.com/gookit/goutil/commit/d613e2f954d7b6546dacca1cefa7988c131d0487
    • up: fsutil - add SplitPath func for split path to dir path and file name https://github.com/gookit/goutil/commit/f1a1967b53484ce61c3671037bcd7989391c95c1
    • up: fmtutil - add SizeToString func for parse size string to byte size https://github.com/gookit/goutil/commit/8dc788fc6c2d96007563ad8e79c47e306f0dc7ab
    • up: sysutil - fix unit test error and update some tests https://github.com/gookit/goutil/commit/750f105bfa78a8ff04dec9c6ba904ebe6f844e2c
    • up: strutil - update some str util func and add some unit tests https://github.com/gookit/goutil/commit/c589e602599da5d9e18b06231d20b29cc00465cf
    • up: cflag - update some parse logic and add new util func https://github.com/gookit/goutil/commit/ba279a50fc3ade309b3e923b8ac87f2a4e24598e
    • up: testutil - add a new asset func StrContains https://github.com/gookit/goutil/commit/ea08fe5a3cba83af5b11f37c2234c035db5f9b10
    • up: sysutil - add a simple pidFile implements and add some consts https://github.com/gookit/goutil/commit/3fe35497855a82b88d9fdcbc320d63ceb8156354
    • up: structs - add some new methods for Value struct https://github.com/gookit/goutil/commit/2729fca53984a8a0b6d512db963f3b23ce9b2b64
    • up: update cflag argument struct field name https://github.com/gookit/goutil/commit/41e0f0a1c4ede17adb83fe0bd357dea56faa30e4
    • up: cflag - add some new func for render flag help https://github.com/gookit/goutil/commit/21791edecd02293da228b57aeb98e60d951f000e

    Other

    • build(deps): bump github.com/stretchr/testify from 1.7.4 to 1.7.5 https://github.com/gookit/goutil/commit/1870903df230bbd44dc012c2d4c85344db3a685e
    • chore: update readme gen cmd, re-generate readme https://github.com/gookit/goutil/commit/17ab736eacf5238f5f7a5f0f127e3cfc18d9633b
    • build(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0 https://github.com/gookit/goutil/commit/cc39bf51dde38a0ab2723c96870e23afc6b679de
    • chore: update and re-generate the readme https://github.com/gookit/goutil/commit/a788c738adb02e22859874432c4e264bb23b85c2
    • chore: update some for gen readme and re-generate readme https://github.com/gookit/goutil/commit/2226a7c9f6ffb37cbf9b360d8729e2319a0d53f9
    Source code(tar.gz)
    Source code(zip)
  • v0.5.5(Jun 23, 2022)

    Change Log

    Feature

    • feat: add a simple extends flag package clitul/cflag https://github.com/gookit/goutil/commit/b66a961d81d1ab7006d92e37f687c3da948aaeb8
    • feat: refactor the cliutil/cflag logic, support shorts and validator https://github.com/gookit/goutil/commit/47b444576aef5044261611429c156f35151aa0dd

    Update

    • update: update some str util functions, add more convert func https://github.com/gookit/goutil/commit/8fbc2fd22143b53f1ef4e56ddff9ac44e1c83a94
    • update: remove the outside value.go file, only keep a alias type https://github.com/gookit/goutil/commit/b9023eb1ceeb6392f18412792d884e09a866265c
    • update: move the stdutil/value to the structs package https://github.com/gookit/goutil/commit/74f7fd9303754abbb2652960507e1db48850edfa
    • up: update the struct tags parse func logic https://github.com/gookit/goutil/commit/de42d06b1e583d5313f295b8288a1da8f96c4b52
    • up: update action yml, add more unit tests for sub pkg https://github.com/gookit/goutil/commit/83643b9155d4294e756ddb199e75caf994852ce6
    • up: update some const, refactor gendoc use cflag pkg https://github.com/gookit/goutil/commit/e948e794f5350745e70386bffe86c819e020db38
    • up: move the cflag pkg to root dir, update some examples https://github.com/gookit/goutil/commit/aebc042255df6f4e96893681b13e45390e790fbf

    Other

    • chore: update the dump perview images https://github.com/gookit/goutil/commit/0063fbd81d46e22f6d9165e179d2ec4c06a3bbba
    • chore: update some comments and update check on action https://github.com/gookit/goutil/commit/ff72b3fb0a924ae06671b326abef593a6c3b8521
    • chore: update some comments for fix code check error https://github.com/gookit/goutil/commit/61f699128b859b45940ceb8594f7cb574dfcc0c6
    • build(deps): bump github.com/stretchr/testify from 1.7.2 to 1.7.3 https://github.com/gookit/goutil/commit/0f35937c3910048d99a44bb7af495ab0a3dc864b
    • chore: update and fix some unit tests error https://github.com/gookit/goutil/commit/1db8c02d4568c7d04aaae391fb5e529fe7bc02bd
    • chore: add more unit tests for some pkg https://github.com/gookit/goutil/commit/07765d2fd90f2589be72df24ae45f4b5720d4309
    • build(deps): bump github.com/stretchr/testify from 1.7.3 to 1.7.4 https://github.com/gookit/goutil/commit/45d367a8ce14d220f309e09f79d8a49284eeb7cf
    • chore: add some tests for fsutil/finder https://github.com/gookit/goutil/commit/f33d4edcbf873ceebe533867d06ee5d5c8302e08
    • chore: update readme generate, re-gen for some new utils https://github.com/gookit/goutil/commit/d4d8f51576caae7abb4493b8111b340ac15c11de
    • chore: update the cflag pkg readme, add more usage https://github.com/gookit/goutil/commit/4b5e559ea6d6e58513b56bfbf657e1dc2f125baa
    Source code(tar.gz)
    Source code(zip)
  • v0.5.4(Jun 12, 2022)

    Change Log

    Refactor

    • refactor: refactoring the timex date template to layout logic https://github.com/gookit/goutil/commit/1a9393705ed2e078d060e1dc056aa77ef0910b9d

    Other

    • build(deps): bump github.com/gookit/color from 1.5.0 to 1.5.1 https://github.com/gookit/goutil/commit/31a8b2469390243eba986803a13c81cf5adece87
    • chore: update readme gen script, re-generate readme https://github.com/gookit/goutil/commit/bc6014bec38d6f0ee7e3280a461d2af33793de97
    • chore: re-generate readme and add some tests https://github.com/gookit/goutil/commit/2a011825f8ce95c3dc3831bee9cb650c400cd681
    • ci: fix unit tests error on run gh action https://github.com/gookit/goutil/commit/199f2a547bfa03140d135ae1cc50128cc111ec54
    • chore: re-generate readme for timex pkg https://github.com/gookit/goutil/commit/5f526d1ff0257034dba0a923f6ae8191e84ed591
    Source code(tar.gz)
    Source code(zip)
  • v0.5.3(Jun 11, 2022)

    Change Log

    Refactor

    • refactor: refactoring the fsutil.Finder, move to fsutil/finder pkg https://github.com/gookit/goutil/commit/df703fc535030303340312496573428fe3d4912e
    • refactor: refactoring the arr and map formatter logic https://github.com/gookit/goutil/commit/a2681c69891b03a4e4a5eb7664f0417c38eb5c52
    • refactor: refactoring the math util compare func https://github.com/gookit/goutil/commit/690fa3baa70dc6b1d6c7bb96c549a0bdffefc639

    Fixed

    • fix bugs; add unit tests for collection https://github.com/gookit/goutil/commit/ce8323f76820a6cf8ee9806bf2d6d595c8faa7e5

    Feature

    • feat: add str util: strutil.Buffer, a extended bytes.Buffer https://github.com/gookit/goutil/commit/53dd0b26764b221151ea6c9c95b3acb7d08c65d7
    • feat(map): add more map util functions https://github.com/gookit/goutil/commit/43d9c2a505cb5cf8f7c40f08a27595edc1f39b6a
    • feat(cli): add some commonly color print func https://github.com/gookit/goutil/commit/1f71958da85f5f819c670cd5235f97976c088014
    • feat: implement new array data formatter arrutil.ArrFormatter{} https://github.com/gookit/goutil/commit/aa242186176b1bb550cab0e7abe98486ccb5abe7
    • feat: add enhanced reflect func pkg: reflects https://github.com/gookit/goutil/commit/652ddd089b67b21303c930c91731dabb81e9fdaa
    • feat: add xxOrErr convert func for str, math pkg https://github.com/gookit/goutil/commit/c6802469304c513c8514e7ea921bc292a9f894d1
    • feat: add more util func to fsutil package https://github.com/gookit/goutil/commit/f6f14a15ae43b67868eaf45fc9d72aba38c56282
    • feat: add TestWriter util struct to testutil package https://github.com/gookit/goutil/commit/43016daac00d78f5b433cee8a6746331b71a3841

    Update

    • up: update gh action flow setting https://github.com/gookit/goutil/commit/365ff00d1f1bf5dedc8ee7a33a3ed2e3a28fcf89
    • ci: update some for action config https://github.com/gookit/goutil/commit/b26a55f1e5aedb872b0ca8b242621d445ed03e27
    • ci: update some for action config2 https://github.com/gookit/goutil/commit/99327b62898d577d4f29b62ec871669fdb1bd003
    • up: update action, will auto generate changelog on release https://github.com/gookit/goutil/commit/4a9d090e184c39ae04c2fe073fd32d1838acb313
    • up: add more extend func for maputil.Data https://github.com/gookit/goutil/commit/642a5ba1c88237a625e8eab0f78dd70e4b004dbb
    • up: update some info for arr, errorx, str util https://github.com/gookit/goutil/commit/a30e8a91823c9fc71a1f8db73802376d9cd7150a
    • up: add new func for quiet convert data type https://github.com/gookit/goutil/commit/04c9faf69b4d01d24c74f6f932ea9d780c28fabf
    • up: rename the strutil.Str to StrVal, add unit tests https://github.com/gookit/goutil/commit/acb0d7fc282aef22210f97a83514768064e0c5ba
    • up: update struct data, go.sum and add ioutil func https://github.com/gookit/goutil/commit/6127faf764f08a58ed4b2d6c3c26632669baf9c9
    • up: rename numutil pkg to numbers pkg https://github.com/gookit/goutil/commit/6f2769baf6425a2c4b7bd451bbdc51d272084f42
    • up: update some for string convert and encode func https://github.com/gookit/goutil/commit/acc6ab77487834e6c7f2a339a760be13454892e6
    • up: update some fs util and sys util https://github.com/gookit/goutil/commit/488660e2a86738ea2bea7c2c5b905ef7070d2efb
    • up: remove goutil.Value logic, link alias to stdutil.Value https://github.com/gookit/goutil/commit/4fad43e345665c3fcdf9674c2bc5ce72b6ab53df
    • up: update some for reflects.BKind, add more tests https://github.com/gookit/goutil/commit/1f2107fb29f40c49df2682bcc66243fda6c700cb
    • up: use os.UserHomeDir instead of the mitchellh/go-homedir pkg https://github.com/gookit/goutil/commit/d56e630ea920d75b82ce141c6d97e45e4aa7d680
    • up: move some sys util func to internal/comfunc pkg https://github.com/gookit/goutil/commit/bddc281ce47787ca90cf7867f6d6fce87763543e
    • up: update some for map data use logic https://github.com/gookit/goutil/commit/62ef51caa0d2695f7ae18b650b33656cf6158bf2
    • chore: update some readme, re-gen readme https://github.com/gookit/goutil/commit/ad8e617303e3eb8e78ae9ced780ab11e225d228c
    • up: add readme and add more uint tests for cliutil https://github.com/gookit/goutil/commit/ff2ed700127854b4bb37dd5a69ff81de4f5c6dce
    • up: move some fs util functions to new pkg stdio https://github.com/gookit/goutil/commit/041802f21547efa53bb65f67225fcfb1b701414a
    • up: add more unit tests for structs pkg https://github.com/gookit/goutil/commit/363cfe4405360d9170fc38422da28bdd755503da
    • up: update some fs util pkg, add more unit tests https://github.com/gookit/goutil/commit/5a8002e8ecda4bf2a06a967b3dc3db06bb50de98

    Other

    • chore(ci): add go code style check on gh action https://github.com/gookit/goutil/commit/4d392d772cb1d157fe4cbedeefcae653065bdfc5
    • chore(ci): delete check go1.14 from gh action https://github.com/gookit/goutil/commit/1e4a287243434b8b55235de3fc1e0bce98e073f4
    • add comment for collection functions https://github.com/gookit/goutil/commit/0eefe08cd317af043d76a2a81a388884fcfb6b9c
    • style: add name prefix for functions and types https://github.com/gookit/goutil/commit/afca2e36953e693851db3fcbfba15c1f77067a14
    • ci: use setup-go-faster instead setup-go action https://github.com/gookit/goutil/commit/44199eeae1dc3b5fdfb23924b683f2f7d5e6c574
    • test: remove unused var value https://github.com/gookit/goutil/commit/606fcffc3063744478ab408a04b188ae75303868
    • build(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.2 https://github.com/gookit/goutil/commit/0e798aef55ec6153919cacc72e627ae7619e7752
    • chore: up readme, re-generate readme docs https://github.com/gookit/goutil/commit/8d107303dc72e8951efae54324ffd85b26495bab
    Source code(tar.gz)
    Source code(zip)
  • v0.5.2(May 8, 2022)

    Change Log

    Feature

    • feat: pkg timex add more commonly used functions https://github.com/gookit/goutil/commit/36423411f5b4d276c57d770e99234e149622e4c2
    • feat: timex add new TimeX.CustomHMS for custom the hour, minute, second create time https://github.com/gookit/goutil/commit/8307e58c03662ff74181042dbaa5a1d8d7a9a0d9
    • feat: add some std util func for reflect.Value https://github.com/gookit/goutil/commit/6593ddf2b76bb0d4efe8e5145d4f3bab52c818b1
    • feat: add new func: fsutil.GlobWithFunc() https://github.com/gookit/goutil/commit/24acc7f571b31f47c2075052219ccf680def3e83
    • feat: add more env util func for get ENV value https://github.com/gookit/goutil/commit/5d71cba1629b3cde9f25bf12575e841adfa7eb50
    • feat: add more time util func on ./timex https://github.com/gookit/goutil/commit/c09cdb9b462882de5e3712e2d8ad52883091a3f7

    Fixed

    • fix map to string panic when map is not nil but map is empty https://github.com/gookit/goutil/commit/54c380ab30d0e6adc9f0a05a107fbaf1b8792f26

    Update

    • up: update some maputil func, add morr unit tests https://github.com/gookit/goutil/commit/9da180a37a959c0556af376db9aa5b84c77f3d27

    Other

    • style: update readme add more util usage exampels https://github.com/gookit/goutil/commit/4f8a02dd49868701066fec433bd7ad2e1f385c25
    • style: update some sub pkg readme docs https://github.com/gookit/goutil/commit/14d7dbb1bc4a6e621f0f3deb217ee50ae4fbf3dd
    • chore: add more unit tests for pkg timex https://github.com/gookit/goutil/commit/c491815221898aef07f75c31520cff68ec97f405
    • chore: update readme and package desc https://github.com/gookit/goutil/commit/de4a262c58c4fb528097baa53be0e7c06aa42ef5

    New Contributors

    • @Kish29 made their first contribution in https://github.com/gookit/goutil/pull/43

    Full Changelog: https://github.com/gookit/goutil/compare/v0.5.1...v0.5.2

    Source code(tar.gz)
    Source code(zip)
  • v0.5.1(Apr 22, 2022)

    Change Log

    Feature

    • feat: add new func errorx.Rawf https://github.com/gookit/goutil/commit/51c4bd77ad01a1213078984cf30152e98abf1ff8
    • feat(timex): add more time util func https://github.com/gookit/goutil/commit/0f4aa7c5d7a05c4fc538e517d4ef8ce703f4393b
    • feat(str): add strutil.MustToTime() for force conv string to time https://github.com/gookit/goutil/commit/27417e5373706c32f23343fdb9efa390373f7e15
    • feat(timex): add more util functions for timex https://github.com/gookit/goutil/commit/24f8ff065d44f5b00cc7bd4ca4cf5fe6a628059a

    Fixed

    • test: fix timex pkg unit test error https://github.com/gookit/goutil/commit/1e8c76f9ed2e40c64421b78f03bdfadbd2bb5400

    Other

    • chore: re-generate the readme docs for timex https://github.com/gookit/goutil/commit/a315a14ef7acb23f50734cfed3e03c8d5ab20779
    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Apr 13, 2022)

    Change Log

    Update

    • up(strutil): add more alias methods for TrimX func https://github.com/gookit/goutil/commit/8e4a84baae208ec597421288e5104807eb3598a9
    • up: update some logic for arrutil.TrimStrings https://github.com/gookit/goutil/commit/2d16b0b2c1361e8a280c8c02789fbf505d264d0d
    • up(fsutil): add Realpath alias of path.Clean https://github.com/gookit/goutil/commit/052a4c410e422815a4a32203383c05bf6940bac0
    • up(mathutil): add TryToString, ToString func for conv intX, floatX to string https://github.com/gookit/goutil/commit/1274dcbb0e9c4f9173418eb1c05d65bbfba55141
    • up(strutil): update some str util func logic https://github.com/gookit/goutil/commit/13e2ebf58c29c4b5623f25fc414a2004a8019f6e
    • prof(errorx): update some errorx logic, add more help func https://github.com/gookit/goutil/commit/09f2973f3356e134efeceee88fa08198a5c5b91d
    • up(dump): add dump.Clear for print no location data https://github.com/gookit/goutil/commit/087fb8ecdc8294bd8a9c88a30093c510a068ff3f
    • up(dump,arr): update some dump, arr check func logic https://github.com/gookit/goutil/commit/dec75c4b68cffc88b0ad30a59a7fef2966a937d5
    • up: update some for errorx pkg https://github.com/gookit/goutil/commit/c9679a0bd25c1cd3bcb6eaa76c17e992b839e22d
    • up(stack): update some logic for get caller info https://github.com/gookit/goutil/commit/b955da85132b8b8ac232e99522dc2237d706bf56
    • up(errrox): update some errorx stack logic https://github.com/gookit/goutil/commit/5ef07cd31e974c4e736cb1379df17970e872b09b

    Feature

    • feat: add some new util func on net, num util pkg https://github.com/gookit/goutil/commit/74cddba8cff7106ca37d68e9ffef6477574ace3f
    • feat: add a enhanced error implements pkg: errorx https://github.com/gookit/goutil/commit/1256e49ba33d3710e8e7efeb2fb4b6f3deda6713
    • feat(arrutil): add new func JoinSlice for join []any slice to string https://github.com/gookit/goutil/commit/6689b5ca9a6785684ad6b445952a03b9f1b78674
    • feat(str): add func Join() for join []strings to string https://github.com/gookit/goutil/commit/079901e6801ef29a3a1c781f6da619def3b61b5e
    • feat: add run tests on go 1.18 https://github.com/gookit/goutil/commit/ddc21889e05e94ea474513af0b762e6ea0f156f3
    • feat(json): add more json util func https://github.com/gookit/goutil/commit/8cdc1212149eb3a015d8d74a121cca7ee1ba237d
    • feat(math): add new num func RandIntWithSeed https://github.com/gookit/goutil/commit/d375e483dec49855a777466852e5920c13218113
    • feat(str): add new str func, add more tests for str util https://github.com/gookit/goutil/commit/6323f70030accfbe43ce7ee3e71783884171668f
    • feat(stdutil): update std util funcs, add more tests https://github.com/gookit/goutil/commit/74b2804b7fdb83d11ebb22e50516231375d3ef71
    • feat(timex): add new util pgk:timex https://github.com/gookit/goutil/commit/7524cd3ae47c676d1660acb50762b0d273fd3627

    Refactor

    • breaking(arrutil): change zhe JoinStrings, StringsJoin func params https://github.com/gookit/goutil/commit/bcd87b804da0b5e986d3d2e55fd7e7702cfcae75

    Other

    • chore: update and re-generate readme https://github.com/gookit/goutil/commit/2af14c4ec3f94349eaffc0c4ef4cc6e07ae63cd1
    • chore: re-generate README docs https://github.com/gookit/goutil/commit/36f1fdf4fc309d8c28eace0d848887c3d4f81207
    • chore: rename an file in errorx https://github.com/gookit/goutil/commit/e55c52ddcb8941a39d23d5b8a75bb52577d5508c
    • chore: update some readme generate logic https://github.com/gookit/goutil/commit/442867382af50906f98d3644151e63c5f99753fa
    • build(deps): bump actions/setup-go from 2 to 3 https://github.com/gookit/goutil/commit/88a74744eb1098680fbcf768f63f81debc2e9fec
    • chore(std): more tests for std stack util func https://github.com/gookit/goutil/commit/da31208f39786cf93bbdcc4c14ca22098274e140
    • chore(readme): re-generate readme docs https://github.com/gookit/goutil/commit/9c9eee783abf220adaaa154b1c1353264ce65148
    • chore(fsutil): update some info for fsutil https://github.com/gookit/goutil/commit/b79ab88ff28d387a71236a96612f0fbdb2ed58df
    • chore(errorx): update some error format logic https://github.com/gookit/goutil/commit/41cf62040cd44da6fa1845d00192ade677595121
    • chore: update readme generate logic https://github.com/gookit/goutil/commit/0016fd11899fd35f2d3a084eeb704b09411f6e95
    • chore(fsutil): update some for fs util, add more tests https://github.com/gookit/goutil/commit/89fd796b2c36ac8d95eed49ce280722b27c47c0f
    • chore(errrox): update doc logic and re-create readme https://github.com/gookit/goutil/commit/83ba2653a1768e2a01d6ccdab5159327d6ae03ee
    • chore: update readme and add some timex tests https://github.com/gookit/goutil/commit/81d5904fa0d26ae51b04941930329419694312e5

    Full Changelog: https://github.com/gookit/goutil/compare/v0.4.6...v0.5.0

    Source code(tar.gz)
    Source code(zip)
  • v0.4.6(Mar 31, 2022)

  • v0.4.5(Mar 30, 2022)

    What's Changed

    • [FEAT] Add json.Number conversion support to the mathutil package by @quetzyg in https://github.com/gookit/goutil/pull/36
    • build(deps): bump actions/checkout from 2 to 3 by @dependabot in https://github.com/gookit/goutil/pull/37
    • build(deps): bump github.com/stretchr/testify from 1.7.0 to 1.7.1 by @dependabot in https://github.com/gookit/goutil/pull/40

    New Contributors

    • @quetzyg made their first contribution in https://github.com/gookit/goutil/pull/36

    Full Changelog: https://github.com/gookit/goutil/compare/v0.4.4...v0.4.5

    Source code(tar.gz)
    Source code(zip)
  • v0.4.4(Jan 18, 2022)

  • v0.4.3(Jan 17, 2022)

  • v0.4.2(Jan 4, 2022)

  • v0.4.1(Dec 29, 2021)

  • v0.4.0(Oct 18, 2021)

    Change Log

    Update

    • update some fsutil func https://github.com/gookit/goutil/commit/b84006a15cf2f19f31a8f9be8bef3fb276f33738

    Feature

    • new: add new func for check string https://github.com/gookit/goutil/commit/0e6f1931ac0797748e0162411f2e493ad3531008
    • new: add new str util func HasOnePrefixes https://github.com/gookit/goutil/commit/2cb94bd06622818c00e577fe9e7428e76ad2745c
    • new: add func SplitN https://github.com/gookit/goutil/commit/b581ed34c5ecce8df3eb0258d51c0dbb2a34c967
    • new: add more str split function https://github.com/gookit/goutil/commit/fc24c6c60ffbbe740c00c30aa8b07ef0c4e184d3

    Other

    • Bump github.com/mattn/go-isatty from 0.0.13 to 0.0.14 https://github.com/gookit/goutil/commit/687b1ccf7ad2671ab5a82a66a1aaa10c813fe45b
    • Bump github.com/json-iterator/go from 1.1.11 to 1.1.12 https://github.com/gookit/goutil/commit/5295ab28524765059117b1101093395d468a3e2a
    • style: update readme https://github.com/gookit/goutil/commit/b252722343e839df03ae10bdcbc64fa7fdbbe4b2
    • Bump github.com/gookit/color from 1.4.2 to 1.5.0 https://github.com/gookit/goutil/commit/8116ebc1cb2a1743314b1b4fd3426ebcb125baea
    Source code(tar.gz)
    Source code(zip)
  • v0.3.15(Jul 30, 2021)

  • v0.3.14(May 26, 2021)

    Change Log

    Update

    • add new method for dump https://github.com/gookit/goutil/commit/5779f252d3b82df012bb441a6758c65749e69504
    • up: add new func for string utils https://github.com/gookit/goutil/commit/39923d058e2c881860fbbe744f258309f7afb8f4
    • update some for go action https://github.com/gookit/goutil/commit/f736cbc95395a034482d229576dec6b80cc81feb

    Feature

    • Support time.Duration in mathutil.Int/Uint https://github.com/gookit/goutil/commit/534f132a697a09ebed42955310a74e9eadb16e57

    Other

    • Bump github.com/json-iterator/go from 1.1.10 to 1.1.11 https://github.com/gookit/goutil/commit/663dd77177e05845704ba3d6d955fa2be0c73f8d
    Source code(tar.gz)
    Source code(zip)
  • v0.3.13(Apr 11, 2021)

  • v0.3.12(Mar 21, 2021)

  • v0.3.11(Mar 20, 2021)

  • v0.3.10(Mar 13, 2021)

  • v0.3.9(Feb 28, 2021)

  • v0.3.8(Jan 26, 2021)

  • v0.3.7(Dec 29, 2020)

  • v0.3.6(Dec 9, 2020)

  • v0.3.2(Aug 30, 2020)

  • v0.2.16(Jul 24, 2020)

  • v0.2.8(Jul 5, 2020)

  • v0.2.7(Apr 26, 2020)

  • v0.2.6(Apr 23, 2020)

Owner
Gookit
🧰 Useful libs for the Go(router, console, log, config, cache, event, validate, filter, i18n, respond-data, view-render, DI)
Gookit
Q2entities - Parse the entities string from a Quake 2 .bsp map file. Written in Go

Q2Entities A simple command-line utility to extract the entities string from a Quake 2 map file. Entities? Binary Space Partitioning maps (.bsp) conta

null 1 Apr 9, 2022
Automatically creates & tiles .tmx format maps from a world map interface

Autotile Create tiled maps for an arbitrarily large world space from a simple interface, then add larger objects randomly with simple rules (eg. place

null 1 Jul 24, 2022
Leftright - A concurrent map that is optimized for scenarios where reads are more frequent than writes

leftright A concurrent map that is optimized for scenarios where reads are more

Yang Pan 1 Jan 30, 2022
Common utils that need in every development

Utils modules Common utils that need in every development Modules Conversion String IntToString(num int) string Int8ToString(num int8) string Int16ToS

Ferdi 0 Nov 5, 2021
List-Utils - 🔧 Utilities for maintaining the list of repost sites

SMR List Utils This is a Go CLI tool that helps with managing the StopModReposts blacklist. Install Use GitHub Releases and download binary. Linux Qui

Stop Mod Reposts 0 Jan 3, 2022
Go-Utils is a library containing a collection of Golang utilities

Go-Utils is a library containing a collection of Golang utilities

Skillz 0 Jun 2, 2022
🍕 Enjoy a slice! A utility library for dealing with slices and maps that focuses on type safety and performance.

?? github.com/elliotchance/pie Enjoy a slice! pie is a library of utility functions for common operations on slices and maps. Quick Start FAQ What are

Elliot Chance 1k Aug 1, 2022
gormuuid array field example

gormuuid - Examples An testing repo for https://github.com/ubgo/gormuuid module How to test Install the postgres and create a new database testdb Upda

Examples 2 Oct 20, 2021
Returns an array of Philippine zipcode details given a search key

Returns an array of Philippine zipcode details given a search key

Reymond 1 Jan 20, 2022
Tiny Go tool for running multiple functions concurrently and collecting their results into an error slice.

Overview Short for "ConCurrent". Tiny Go tool for running multiple functions concurrently and collecting their results into an error slice. Dependency

Nelo Mitranim 0 Nov 22, 2021
Wrap byte read options with uniform interface for io.Reader and byte slice

nibbler Nibble chunks from Reader streams and slice in a common way Overview This is a golang module that provides an interface for treating a Reader

null 0 Dec 23, 2021
Go 1.18 generics based slice and sorts.

genfuncs import "github.com/nwillc/genfuncs" Package genfuncs implements various functions utilizing Go's Generics to help avoid writing boilerplate c

Nwillc 20 Jul 20, 2022
Go-library that facilitates the usage of .env files

Goenv Golang-library that facilitates the use of .env files. Installation go get github.com/fabioelizandro/goenv Usage Place a .env file in the root

Fabio Elizandro 1 Nov 7, 2021
make slice items unique in go

make slice items unique in go

Dariush Abbasi 3 Jan 20, 2022
Slice conversion between primitive types

sliceconv Sliceconv implements conversions to and from string representations of primitive types on entire slices. The package supports types int, flo

Henry Sarabia 8 Jan 24, 2022
Go-path - A helper package that provides utilities for parsing and using ipfs paths

go-path is a helper package that provides utilities for parsing and using ipfs paths

y 0 Jan 18, 2022
Helper library for full uint64 randomness, pool backed for efficient concurrency

fastrand64-go Helper library for full uint64 randomness, pool backed for efficient concurrency Inspired by https://github.com/valyala/fastrand which i

Ryan Haksi 41 Dec 5, 2021
tfu is a Terraform helper to update the providers of Terraform

tfu (speak 'TF-up') tfu is a Terraform helper to update the providers of Terraform Works only starting from version Terraform 0.13+ Nothing more nothi

Engin Diri 13 Apr 26, 2022
Little helper to create tar balls of an executable together with its ELF shared library dependencies.

Little helper to create tar balls of an executable together with its ELF shared library dependencies. This is useful for prototyping with gokrazy: htt

null 8 Jun 13, 2022