💪 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

Comments
  • 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
  • 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 bug_fixed 
    opened by pseudocodes 3
  • 在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
  • filter中的str2time的问题

    filter中的str2time的问题

    package main
    
    import (
    	"fmt"
    	"time"
    
    	"github.com/gin-gonic/gin"
    	"github.com/gin-gonic/gin/binding"
    	"github.com/gookit/goutil/dump"
    	"github.com/gookit/validate"
    )
    
    func main() {
    	binding.Validator = &customValidator{}
    	r := gin.Default()
    	r.POST("/user/list", func(ctx *gin.Context) {
    		var user User
    		err := ctx.ShouldBindJSON(&user)
    		if err != nil {
    			dump.P(err)
    			ctx.String(400, "出错"+err.Error())
    			return
    		}
    		ctx.String(200, fmt.Sprintf("验证通过:%v", user.Time))
    	})
    
    	r.Run(":8080")
    }
    
    type User struct {
    	Time time.Time `json:"time" validate:"required" filter:"str2time"`
    }
    
    type customValidator struct{}
    
    func (c *customValidator) ValidateStruct(ptr interface{}) error {
    	v := validate.Struct(ptr)
    	v.Validate() // do validating
    
    	if v.Errors.Empty() {
    		return nil
    	}
    
    	return v.Errors
    }
    
    func (c *customValidator) Engine() interface{} {
    	return nil
    }
    

    post请求发送json数据

    {"time":"2018-10-16 12:34:01"}
    

    输出结果

    出错parsing time "\"2018-10-16 12:34:01\"" as "\"2006-01-02T15:04:05Z07:00\"": cannot parse " 12:34:01\"" as "T"
    

    为什么不能解析?

    另外在strutil/convert.go代码中

    		// has 'T' eg: "2006-01-02T15:04:05"
    		if strings.ContainsRune(s, 'T') {
    			layout = strings.Replace(layout, " ", "T", -1)
    		}
    
    		// eg: "2006/01/02 15:04:05"
    		if strings.ContainsRune(s, '/') {
    			layout = strings.Replace(layout, "-", "/", -1)
    		}
    

    strings.Replace函数的第2个与第3个参数是不是写反了?

    invalid question 
    opened by weiyunxiao 2
  • 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>

    enhancement 
    opened by lx-world 2
  • 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
  • build(deps): bump golang.org/x/text from 0.4.0 to 0.5.0

    build(deps): bump golang.org/x/text from 0.4.0 to 0.5.0

    Bumps golang.org/x/text from 0.4.0 to 0.5.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] 1
  • build(deps): bump github.com/gookit/color from 1.5.1 to 1.5.2

    build(deps): bump github.com/gookit/color from 1.5.1 to 1.5.2

    Bumps github.com/gookit/color from 1.5.1 to 1.5.2.

    Release notes

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

    v1.5.2

    Change Log

    Refactor

    Fixed

    Update

    Other

    Full Changelog: https://github.com/gookit/color/compare/v1.5.1...v1.5.2

    Commits
    • d0fe513 chore: update some comments code styles
    • ee046fd Update README.zh-CN.md
    • b59a811 Update README.md
    • bf93227 fix: RGBFromString() maybe input overflow int value
    • 1905566 Merge pull request #50 from gookit/dependabot/go_modules/github.com/stretchr/...
    • 1823e0c build(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0
    • 0ec8e78 chore: add more docs for detect color level on readme
    • d305f5f chore: update the readme add more HTML like tags usage
    • e12eb6f chore: update the limit go version and update release gh action
    • efc6d3f refactor: update and refactor the color tag parse logic
    • 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.


    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] 1
  • 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
  • runtime error: makeslice: cap out of range

    runtime error: makeslice: cap out of range

    • OS: linux
    • GO Version: 1.19.3
    • Pkg Version: 0.6.1

    I use dump.Format(ob) where ob is an interface of struct then I have error: runtime error: makeslice: cap out of range

    trace is:

    Screenshot from 2022-12-25 15-12-24

    bug 
    opened by Mehrdad-Dadkhah 0
  • 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
Releases(v0.6.1)
  • v0.6.1(Dec 12, 2022)

    Change Log

    Feature

    • :sparkles: feat: add new sub package byteutil provide some bytes utils https://github.com/gookit/goutil/commit/e5a08d4ea5eea1c7571f3b11cde3d59f8b89e473
    • :sparkles: feat: add new sub package strutil/secutil provide aes cbc crypto function https://github.com/gookit/goutil/commit/e121b7c1232b2ec0fb2822242602e6828cb6923b
    • :sparkles: feat(dump): support dump []byte as string and more new options #74 https://github.com/gookit/goutil/commit/025464a32940e585c83b76413dc5f18fd4459197
    • :sparkles: feat(structs): add new util func for check struct field is exported https://github.com/gookit/goutil/commit/179afea5759f5bc5f3373a1b9238abf4a8257274
    • :sparkles: feat(dump): support skip nil field dump on map, struct by option SkipNilField #41 https://github.com/gookit/goutil/commit/a55c5ca4939845f91a72d2c3c49dcf16e9343127
    • add SubstrCount and test case. https://github.com/gookit/goutil/commit/1bff3b30b0619650a07512f5eb67b2da1981c0b8

    Update

    • up: str, math - update some for int64 to string convert https://github.com/gookit/goutil/commit/449331c8d2e54db9b963fb794d7bdce19511dcf7
    • :necktie: up: str - update bytes util and add new hash utils https://github.com/gookit/goutil/commit/8eef351026d5654e6475b9a44bd9f6fd3525c753
    • :fire: up: remove deprecated package common https://github.com/gookit/goutil/commit/17c48953a865f1d4af203d6db47410d69db58c7d

    Other

    • build(deps): bump golang.org/x/text from 0.4.0 to 0.5.0 https://github.com/gookit/goutil/commit/5297b13dd32936b2d3c3bfc051e817ca6999ee9d
    • chore: update some readme and re-generate readme docs https://github.com/gookit/goutil/commit/c3f5086cbae508d94bd20b0c19a4253aabd15821
    • :bulb: chore: add package comment or exported var comment https://github.com/gookit/goutil/commit/6ace647b01b923f158a5bb1b8af0e8573eb347d9
    • :bulb: chore: add exported var comment, fix some name style https://github.com/gookit/goutil/commit/ea10bc76842b7c3d82af39c155a59c5d9eeebe99
    • :bulb: chore: add comment for exported vars, methods. https://github.com/gookit/goutil/commit/bc0a0b8322a198f4532a02bddfb804e8b25761b6

    What's Changed

    • tweak for format by @xiaozuo7 in https://github.com/gookit/goutil/pull/72
    • build(deps): bump golang.org/x/text from 0.4.0 to 0.5.0 by @dependabot in https://github.com/gookit/goutil/pull/73
    • add SubstrCount and test case. by @huangkuan123 in https://github.com/gookit/goutil/pull/75

    New Contributors

    • @xiaozuo7 made their first contribution in https://github.com/gookit/goutil/pull/72
    • @huangkuan123 made their first contribution in https://github.com/gookit/goutil/pull/75

    Full Changelog: https://github.com/gookit/goutil/compare/v0.6.0...v0.6.1

    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Nov 29, 2022)

    Change Log

    NOTE: since v0.6.0 require go 1.18

    Refactor

    • refactor: replace Readdir(-1) with ioutil.ReadDir https://github.com/gookit/goutil/commit/cd99ed9badd99e8ea856e22769adfdc577f9e53a

    Feature

    • up: sysutil/cmdr - add more feature methods for cmdr.Cmd https://github.com/gookit/goutil/commit/d769fc1ddd0ba6a3bab23b60ad2a7b810a880942
    • feat: errorx - add some feat error types to errorx https://github.com/gookit/goutil/commit/b177c935178babc48e469b25b05f882aa8f31110
    • feat: add some commonly asset function like NotEqual, NoError https://github.com/gookit/goutil/commit/767d6c647feb121dccb9538dd224faaa5af686c2
    • feat: arr - add new func Map/Column for mapping an object list to flatten list https://github.com/gookit/goutil/commit/3a623fda6c4f06632e8881488af3fa0788e9d7fc
    • feat: add sync errgroup to goutil package https://github.com/gookit/goutil/commit/dd9e08df6573d29053b9dc583535ea1f8193b241
    • feat: str - add more padding util functions https://github.com/gookit/goutil/commit/55b0e1747fb07062fa7f7c62782b185160a9c06f

    Update

    • up: sys/cmdr - add more methods to Task, update some tests https://github.com/gookit/goutil/commit/f13aac29783b059a1c243240062cce5c70ab8fe1
    • up: env - add some env func, update readme docs https://github.com/gookit/goutil/commit/f5ee49b96ca48c2cbad7d1823c8b1afaa63915bc
    • up: std - remove some unused files and pkg on std https://github.com/gookit/goutil/commit/0aaeb53dab795cb92ead3514f4eab6629ccf4f47
    • up: sysutil/cmdr - update the task, runner logic, rm dep cliutil https://github.com/gookit/goutil/commit/b7ca58ff440fea0dba446656daea2dd057b3b4a7
    • up: str, cmdr - add some new tool function and method https://github.com/gookit/goutil/commit/496f72edab90a28b5f24792c2cd974b5b94da435
    • up: require go >= 1.18, and only tests on go 1.18+ https://github.com/gookit/goutil/commit/965e4f0cd348b6576ef1fe2b4226a388269e619a
    • up: remove any.go file, update some arr util functions https://github.com/gookit/goutil/commit/623fc20818c405a447da1417e7d92dea51ea43d4
    • up: migrate interface{} to go1.18 any keywords https://github.com/gookit/goutil/commit/a90d655aec2aa7b8e44d3e6878291fec1658adbd
    • up: migrate more interface{} to go1.18 any keywords https://github.com/gookit/goutil/commit/b198b7399329f779cb8a95865a7d85fe34a01eb5
    • up: update readme template and re-generate README https://github.com/gookit/goutil/commit/6a1054c9767e5267220e9bc21bcd1ebf47cde60f
    • up: errorx - update extend error types, add more unit tests https://github.com/gookit/goutil/commit/71fc27accb4b7b5438026dcf7b9c1efe68b1f530
    • up: str - update and add some encode util functions https://github.com/gookit/goutil/commit/9adb2fe0612e59a459357d66363a3b39fd2dcec4
    • up: str - update and add some rune util functions https://github.com/gookit/goutil/commit/887ac5b3e6bc604cce9031d911206af7be9056d9
    • up: net - update and add some http client util functions https://github.com/gookit/goutil/commit/7f9bebc340ff9cd2137f4d5bda4463ae31b08fe0
    • up: net - remove not used sub package httphelper https://github.com/gookit/goutil/commit/0caf321fd71da69657305aa2842fd46c2522495e
    • up: com, dump - add some common types and update for dump slice https://github.com/gookit/goutil/commit/8fc149929ea1744b80a53c5c15dff6747d5e459e
    • up: fix some tests and code style error https://github.com/gookit/goutil/commit/daabe2bb6f5c9eeb173a793a8eb8cd74397607ad
    • up: modify some dep package logic https://github.com/gookit/goutil/commit/3640638f67357d0ee35ad87d69597a151805ddb5
    • up: fix cli read error and add new cli util func https://github.com/gookit/goutil/commit/40e02c79b29bbc839da0749afbe05b15dab771da

    Other

    • build(deps): bump golang.org/x/text from 0.3.8 to 0.4.0 https://github.com/gookit/goutil/commit/6619a9a0e8804c0eb51562cfe139cabecabcc6d3
    • style: format all sub pkg codes by go fmt https://github.com/gookit/goutil/commit/3f1a328a805f927e31f80b8816118a57100326cd
    • chore: migrate more interface{} to go1.18 any keywords https://github.com/gookit/goutil/commit/7ba341de47962604821927f6abee18a74661e8ab
    • build(deps): bump WillAbides/setup-go-faster from 1.7.0 to 1.8.0 https://github.com/gookit/goutil/commit/d5689ca3edba6c8f5646c709b8d40b6f583892d1
    • doc: update and re-generate README docs https://github.com/gookit/goutil/commit/5346ec569782bb930df5e7521b6b36191ba7abdd
    • chore: add desc commonts for const, vars and package https://github.com/gookit/goutil/commit/ad8ce94d6760bbe992e2db9b6ed336bb5ae72e8c
    • chore: re-genreate docs and fix pkg not import https://github.com/gookit/goutil/commit/c6fc88109161c0baab2746e33efd6ac726316731

    New Contributors

    • @cokeBeer made their first contribution in https://github.com/gookit/goutil/pull/69
    • @Juneezee made their first contribution in https://github.com/gookit/goutil/pull/71

    Full Changelog: https://github.com/gookit/goutil/compare/v0.5.15...v0.6.0

    Source code(tar.gz)
    Source code(zip)
  • v0.5.15(Oct 16, 2022)

    Change Log

    Update

    • up: textscan - update the multi line value match logic https://github.com/gookit/goutil/commit/1ac1ddc46d29e2c3faabc3e3f5b81c32694e0d8d
    • up: cflag - update some comments for type https://github.com/gookit/goutil/commit/9027fde10665b64ca9f8f8f53ad88aec08bc155e

    Other

    • chore: textscan - update pkg readme https://github.com/gookit/goutil/commit/f6ba94b4a6265311f6236f6c6fe860e70a17d90a
    • doc: update top and some sub pkg README docs https://github.com/gookit/goutil/commit/87c962df87d64679faed49bef7658bc94cf4fd33
    • chore: update toe arr, str, test pkg README https://github.com/gookit/goutil/commit/7526dca133db0dff4a50bf8bea42cf13ad702bca
    Source code(tar.gz)
    Source code(zip)
  • v0.5.14(Oct 15, 2022)

    Change Log

    Feature

    • feat: strutil/textscan - implements a simple testscan for quickly parse lines text https://github.com/gookit/goutil/commit/1b9f75c9f25d183222a4a0acbbc1dee51dc540a6

    Update

    • up: stdio, str - update and add some util functions https://github.com/gookit/goutil/commit/afdcc45ce18252a14bee54c0d30a90bb959ca4c1
    • up: com, str - add some consts and add some tests https://github.com/gookit/goutil/commit/f9e4a306022a627455163c975db51b623077ed06
    • up: update the textscan some logic and update readme https://github.com/gookit/goutil/commit/75780ae3356ff2106fab4cfd0939775304fcf0d1

    Other

    • build(deps): bump golang.org/x/text from 0.3.7 to 0.3.8 https://github.com/gookit/goutil/commit/028b960e71da282e951dc4877881d159796a51e7
    • chore: update and re-generate readme docs https://github.com/gookit/goutil/commit/36093369c3d56b3bc3cbe2035282de4de1226f03
    Source code(tar.gz)
    Source code(zip)
  • v0.5.13(Oct 4, 2022)

    Change Log

    Update

    • up: cflag - update some util func, add some new files https://github.com/gookit/goutil/commit/ae3ee9fc11799f03ccf6c731418f68d243ac3e1d
    • up: structs - update the tag value parse func, allow limit keys https://github.com/gookit/goutil/commit/4e6e0654ee70a44262dd545d4a74589ca1b89137
    • up: str - add some new alias for commonly funcs https://github.com/gookit/goutil/commit/99246f0c78ddaf0fd6ebd226fecccb41ef673dd3
    • up: math - update the value compare op chars https://github.com/gookit/goutil/commit/5c30935e3c75514a8e20a027bdc8190e8be8543b
    • up: rename str convert to conv.go https://github.com/gookit/goutil/commit/baae69de1517a148f729f214fe94cda0ba662612

    Other

    • build(deps): bump morphy2k/revive-action from 2.4.0 to 2.4.1 https://github.com/gookit/goutil/commit/145eac6459e6b8234cda098a0e29ad07e514727a
    • chore: fix str pkg build error, update some comments https://github.com/gookit/goutil/commit/df9033763ffa88942b77838135683d061fdefafb
    • chore: timex - fix unit test error and rename type TimeX to Time https://github.com/gookit/goutil/commit/7eaa5e5c5eea732957caac8cb043ec038ee90b65
    • timex add some sub method https://github.com/gookit/goutil/commit/1f09356bc9e58f043cd851535e8ca6db56422290
    Source code(tar.gz)
    Source code(zip)
  • v0.5.12(Sep 14, 2022)

    Change Log

    Refactor

    • refactor: refactoring the pkg /common to /comdef, will be deleted common pkg at soon https://github.com/gookit/goutil/commit/2547a11b235db55941232d06c89c3a5e31648181

    Feature

    • feat: reflects - add func ValToString and String for convert reflect.Value to string https://github.com/gookit/goutil/commit/985e9560ce6e7e1bf743f805c20d6af5b5765ce5
    • feat: map - add new func Flatten, FlatWithFunc for flat tree map https://github.com/gookit/goutil/commit/ee252cd2e46cc0f90e674133f49e6e23093e3bdc
    • feat: reflects - add new func FlatMap for handle tree-map value https://github.com/gookit/goutil/commit/b90b8219292b0e49a28591f2fa7ca73795d31329
    • feat: cflag - add a simple cli application implement https://github.com/gookit/goutil/commit/3aa688fa6918507f34fd5cb5500e1bab493126e9

    Update

    • up: str, math - remove pkg ErrConvertFail, replace to common.ErrConvType https://github.com/gookit/goutil/commit/9f349ab2333aaf549fd23a97d003dead3515aba2
    • up: goutil, internal - add some new util conv functions https://github.com/gookit/goutil/commit/bad3157575f68510407a6827b84135bda73dd8db
    • up: replace all use pkg /common to pkg /comdef https://github.com/gookit/goutil/commit/d21b1a93f81bc425b14aeac5453265776f72ccd2
    • up: structs - update the structs.Data and LiteData logic https://github.com/gookit/goutil/commit/c4cf02b6f9ca95b41676cf4d08d19a7ba9145854
    • up: test - add new env mock util func, fix some test error https://github.com/gookit/goutil/commit/9ebc0e0f879b88e36670dff26dc3dc69a49b608a
    • up: map - move the flat tree map logic to pkg /reflects https://github.com/gookit/goutil/commit/ace83c68309ceae4d6e3e69622f1c5aea4edae92
    • up: cflag - add more unit tests and update readme https://github.com/gookit/goutil/commit/4e38f7878a874ff5e009d4b6891e991710c4cb4a
    • up: std - add more func unit tests https://github.com/gookit/goutil/commit/fa5a33c0d50b56251d087ff270875ca5151d4c64
    • up: net,http - add more func unit tests https://github.com/gookit/goutil/commit/0edd1cb4c94038757fe8e8f7735d3d212885805d

    Other

    • doc: update readme and re-generate readme https://github.com/gookit/goutil/commit/1711db934bf5d57b419b51b3dd0ab286da9dd208
    • chore: update and re-generate README https://github.com/gookit/goutil/commit/88afe8e6409b954c26b1fab3efd2915e3e4e44ec
    Source code(tar.gz)
    Source code(zip)
  • v0.5.11(Sep 3, 2022)

    Change Log

    Feature

    • feat: structs - init object support parse Env var on struct tag default https://github.com/gookit/goutil/commit/39e9cd60e076f3ed0dad3c4c5d4a2ac6f04d32e3
    • feat: sys - add new util funcs and add Cmd for quick build exec.Cmd https://github.com/gookit/goutil/commit/872f586a1241b9dc48f793ae0f7433d465c7d5fc
    • feat: timex - add new methods for auto parse date to time.Time https://github.com/gookit/goutil/commit/d03c4c135245e23753e3d1f25e1c644e35132929
    • feat: sys - add new util func EnvPaths(), SearchPath() https://github.com/gookit/goutil/commit/0613a101c2678dbd138e3b89c4c40c17202fd1a8
    • feat: sys - add new sub pkg sysutil/cmdr for build cmd and batch run tasks https://github.com/gookit/goutil/commit/eafd6c6bd6776ba8442b56a6f8e40ae952d28fd2
    • feat: str - add new func IsVersion check version number https://github.com/gookit/goutil/commit/8d0994c8989217f588ce4d6d8d3b5a4d0732267f
    • feat: structs - add new func SetValues for set struct field values https://github.com/gookit/goutil/commit/4391dcf388c4a79fd4b4451688c64167096c23f7
    • feat: reflects - add new func ValueByType and SetValue, add more unit tests https://github.com/gookit/goutil/commit/06d29d1e69fc0ff179a015d8dffb161b5f29e466

    Update

    • up: structs - update the Value some methods, add more unit tests https://github.com/gookit/goutil/commit/cef0274c0f27a068933badd24789ad8659020bdf
    • up: arr,cli - add more util funcs StringsMap(), OutputLines() https://github.com/gookit/goutil/commit/b70616e86ec0efb02add5a4500e9aeea2cef1ee7
    • up: update some func comments and update deps https://github.com/gookit/goutil/commit/a5d24419d8fbaa822121bdb0a45564901f919b65
    • up: update some for run sys cmd, update deps https://github.com/gookit/goutil/commit/d55b5912dc8d459bc201974b5830fe78db1bfb99
    • up: str - update the ToTime logic for support more layout sample https://github.com/gookit/goutil/commit/c200a42150caa356f9bdb6060f1d2b81587bb99a
    • up: timex - update some util funcs, add more unit tests https://github.com/gookit/goutil/commit/afa5abf3365ea6c6bd2bf7c2bc66b4949bbc18b7
    • up: env - update some util funcs, mv parse env var to internal/comfunc https://github.com/gookit/goutil/commit/d318d81d605d0df62bb5d8b06505114576bcc07e
    • up: sys - update some util funcs and some comments https://github.com/gookit/goutil/commit/cbf1222578bb050b26edae041b40fc20b61eaabb
    • up: structs - update tag parse rm dep the envutil, add more tests https://github.com/gookit/goutil/commit/d27973e75204eb1aa0961a19677ede442898a7df
    • up: str, math - update some util func, add more tests https://github.com/gookit/goutil/commit/a3a35949f9b6c4c98ca5f1b80afbf0c6afe1fab7
    • up: arr, cli - add new methods to Strings, mv a func to internal https://github.com/gookit/goutil/commit/4ef62b0b10ff38aac1c664d6062746bf440e99b3
    • up: str, common - mv ToBool func to internal pkg https://github.com/gookit/goutil/commit/6a060517f43a9ed487a5b37c5b225060161a6d94
    • up: sys - mv Cmd struct and logic to sub pkg sysutil/cmdr https://github.com/gookit/goutil/commit/5e1586605d00c0bc6bf8801c095b6c7cdb993e22
    • up: sys - update some for cmd build and run logic https://github.com/gookit/goutil/commit/24362842efb29ab331e9f5ac5723084c7b411cc8
    • up: env - rename the comfunc.ParseValue to comfunc.ParseEnvVar https://github.com/gookit/goutil/commit/3d8a54424df102b687a01d3f7034b08b166958ae
    • up: str, map - add more unit tests and update some comments https://github.com/gookit/goutil/commit/30ab6b9cfb495dad97d5e3dafe094782bbd33b70

    Other

    • test: fix some tests run error, up readme https://github.com/gookit/goutil/commit/9a8762fdffa71d9c2df83e08b4bd7594b600a250
    • test: fix sysutil/cmdr test error on action https://github.com/gookit/goutil/commit/328cb7cfdef49c46f27dc82e91a395e2e766c525
    • test: fix strutil test error on action go1.18 https://github.com/gookit/goutil/commit/c3cc6fd2541e84da1602408666c559a7de0a51d9
    • doc: update some pkg docs, re-generate README https://github.com/gookit/goutil/commit/ec8537077a8b4dd809d99a256f260278f653a640
    • docs: add some README to sub pkg, re-generate top README https://github.com/gookit/goutil/commit/c867d45c19e0fd08564777fc4e8d29add79ad85e
    • chore: update the go.sum and update readme https://github.com/gookit/goutil/commit/d31c5265adf69da2a3333ca98f9ed21080639490
    Source code(tar.gz)
    Source code(zip)
  • v0.5.10(Aug 28, 2022)

    Change Log

    Feature

    • feat: structs - InitDefaults() can init a struct by default tag https://github.com/gookit/goutil/commit/a83c4b2062f2742474402fd654ebe0a9df45dc1d
    • feat: reflect - add some new util functions. eg: BaseTypeVal(), ValueByKind() https://github.com/gookit/goutil/commit/f24965fb16f19214f39af5e7958eb255d0b7f991
    • feat: goutil - add commonly convert, check util functions to top package https://github.com/gookit/goutil/commit/202b7ad40f4595911bba8ff1cbc6624277c722ef

    Update

    • up: str - add new func NoCaseEq for check two string is equals https://github.com/gookit/goutil/commit/fe475188053b407d9070bcd663faf8f498d14dff
    • up: test - add new func ErrIs for check two err is equals https://github.com/gookit/goutil/commit/f43767bb25e36eb639a10c0b0d03407bf5bcdb99
    • up: structs - update the to map logic, support handle sub-struct https://github.com/gookit/goutil/commit/a3ac95f78bd31aff51c800344c794f77d4e46038
    • up: structs - update the struct tags collect and parse logic, support handle sub-struct https://github.com/gookit/goutil/commit/10265c9fdd3015dca45274cf27e73b31cc7dbdfa
    • up: std, str - update some util func, update some comments https://github.com/gookit/goutil/commit/97eb6db310aa37c1720f0a64aa16b6121a1cbd42
    • up: update deps, remove dep the pkg stretchr/testify https://github.com/gookit/goutil/commit/836329f290d7b60ce8375888c2184272b6303d3b
    • up: structs - refactor the options logic for conv struct to map https://github.com/gookit/goutil/commit/246785b8b6854cc540e3321b5faf69a3ba62c06e
    • up: structs - enhance the init struct default value logic, add more tests https://github.com/gookit/goutil/commit/972be5cc76d80205d2af7c38a315a5cab60a21ef

    Other

    • chore: update some sub package docs on README https://github.com/gookit/goutil/commit/f0884620b191d57b1e7339ec656869bb56ce642c
    • test: fix imports error on tests for pkg errorx https://github.com/gookit/goutil/commit/8220003d295519afb8adcec965bb9a3d1be515ed
    • docs: re-generate README for update docs https://github.com/gookit/goutil/commit/73059d2d38c494dd4f86bf6ab658698bf71f9024
    • test: add more unit tests for pkg reflects, std, sys, test https://github.com/gookit/goutil/commit/640c5c6016c095e7c02a4dd02f8fe3f2a47e0dae
    • test: update and add more unit tests for pkg /strutil https://github.com/gookit/goutil/commit/f8ac90ab551bd21789697dab4ef84d28a87d5a69
    • test: update and add more unit tests for pkg cli, net, structs, goutil https://github.com/gookit/goutil/commit/96d610d5403b465260c559cf7c4123d3531f1351
    Source code(tar.gz)
    Source code(zip)
  • v0.5.9(Aug 17, 2022)

    Change Log

    Feature

    • feat: str - add some new func Indent(), IndentBytes() and more https://github.com/gookit/goutil/commit/4f9cd9f5abb62259669580f1009e8a3b750053ef
    • feat: str - add new func Unquote() for remove start and end quotes https://github.com/gookit/goutil/commit/0928025560f74e82fca443daa164f14774611b9e
    • feat: cli - add new func ShellQuote() quote a string on contains ', ", SPACE https://github.com/gookit/goutil/commit/fb556b3b919eb33595dd959e0d7cb75263c811ec

    Update

    • up: map - add some new method to Data, SMap https://github.com/gookit/goutil/commit/bea6c4ef57ba2bdbdb5fc1b5d58b8da9b58c63c4
    • up: structs - update some comments and rename MapDataStore to DataStore https://github.com/gookit/goutil/commit/8c33ace17df2a74b2c07bda4cb8c414a2f49d6e5
    • up: map - update the deep set value func logic, add more tests https://github.com/gookit/goutil/commit/4819b15a2d70b2daa09c579d3f370543c4eae2a4
    • up: map - update the MakeByKeys(), support make slice on last key like 'key[2] https://github.com/gookit/goutil/commit/3385cec7ab2c589c68ec3459c0a36dbdd16b8845
    • up: map - update the Data.SetByKeys(), fix set value fail on Data is empty https://github.com/gookit/goutil/commit/86624809459dd21bceb6e313380f0d9e67495ddb
    • up: assert - add new assert func IsKind() for check reflect Kind https://github.com/gookit/goutil/commit/dd381481baffe4ddc599c4692fb33c8cb1fec959
    • up: str - update the strutil.Value use pointer for struct methods https://github.com/gookit/goutil/commit/1a071036ebe7f61f94581ba862a9d608b156d84c
    • up: dump,structs - use built in assert instead of stretchr/testify https://github.com/gookit/goutil/commit/7d99e1d1fcb2d66fa589aaf3e12ca4cfb2277e86
    • up: cliutil - use built in assert instead of stretchr/testify https://github.com/gookit/goutil/commit/2468fe61fb09283ac8dc45226d8db8c4d01fc24d
    • up: sys - use built in assert instead of stretchr/testify https://github.com/gookit/goutil/commit/4062fe5f0321e00a4e2e36b2f67dca95c5589300
    • up: fs - use built in assert instead of stretchr/testify https://github.com/gookit/goutil/commit/0e31ea1464e2d946fe657f055670e5c05f73f3c7
    • up: map - enhance for deep set value, add more test cases https://github.com/gookit/goutil/commit/bd3fe2e9b768c185dea20c70f4dd9a3bd0bc2190
    • up: map - update some for Data, add more test cases for SetByPath() https://github.com/gookit/goutil/commit/0abb7cbadd1957fab9cc918867679a1dee7a0ffb
    • up: update some method for map.Data, add test on go1.19 https://github.com/gookit/goutil/commit/2ad34363bc472e1634bf99281542158f09e3e0d9

    Other

    • chore: maputil - remove debug dump codes https://github.com/gookit/goutil/commit/6a2622be93bcdb6686a260adaef0a9d2488e0b3c
    • build(deps): bump github.com/mattn/go-isatty from 0.0.14 to 0.0.16 https://github.com/gookit/goutil/commit/f8675108b1df2cba56a43b8e988b43d216ca41b8
    • chore: update readme and re-generate readme docs https://github.com/gookit/goutil/commit/6c94a84f2c77f7560e28392a83121da89aa05d16
    Source code(tar.gz)
    Source code(zip)
  • v0.5.8(Aug 11, 2022)

    Change Log

    Fixed

    • fix: cflag - ReplaceShorts() should support replace '-n=tom' -> '--name=tom https://github.com/gookit/goutil/commit/ec30cf1075bdb4af97d43cfe88e7716cf2c55703

    Feature

    • feat: maputil - add HasAllKeys() for check map keys exists https://github.com/gookit/goutil/commit/ce64d2a8cac12ce76eacad20603eee3023459a12
    • feat: testutil/assert - add ContainsKeys() for check map keys exists https://github.com/gookit/goutil/commit/aeaefef6ba205b292f9f9b0a348878bfa4269141
    • feat: reflects - add new util func SliceSubKind() https://github.com/gookit/goutil/commit/8e30e1414dee8530868afd1f6661bf8a743357aa
    • feat: mathutil - add new util func Compare(), CompInt64(), CompFloat() https://github.com/gookit/goutil/commit/4342ae96f7424f6813578ae1e378bc7e6a85bfa1
    • feat: map - update some maputil.Data method, add new func SetByPath() https://github.com/gookit/goutil/commit/aa5c99ad6933c44a5279be42c1e8eabbfe4f3f77
    • feat: map - add SetByPath(),SetByKeys() for deep set value on map data https://github.com/gookit/goutil/commit/bcf556be1b74110ff7fc630b4209d271a532e3ef
    • feat: str - add new func Utf8Width() for calc string width https://github.com/gookit/goutil/commit/149b651d0cc92ea46a9d8fc0ba6aae742de6dd6e
    • feat: str - add func RuneWidth, Utf8Truncate,Utf8Split for handle utf8 string https://github.com/gookit/goutil/commit/de249753cd05f0d5747c24eb8d38e100006fc60c
    • feat: map - complete the deep set value to map func SetByPath() https://github.com/gookit/goutil/commit/a0654b8e09afda54dc49c8216e689f4d1a6a4c77

    Update

    • up: errorx - remove depend on the mathutil package https://github.com/gookit/goutil/commit/994524a96c584dd01b1a6251e0de84efdede6853
    • up: arrutil - remove depend on the stretchr/testify package https://github.com/gookit/goutil/commit/814318d9b1b70a6ded2262ac43ba41703bd68c6d
    • up: maputil - update some map util func logic https://github.com/gookit/goutil/commit/f395939b890e5689a28f5bf89b3f10a5bb520648
    • up: maputil - use goutil/testutil/assert instead of stretchr/testify/assert https://github.com/gookit/goutil/commit/3f24613d6fc45a5a4cdecdaf8db66b4fad56743f
    • up: arr,cflag,math,reflects - use goutil/testutil/assert instead of stretchr/testify https://github.com/gookit/goutil/commit/321759955d3804decad14f51339220a00dcac39b
    • up: stdio,structs,test,timex - use goutil/testutil/assert instead of stretchr/testify https://github.com/gookit/goutil/commit/ed1aa289920acb48c329f05511d88f0960aaac56
    • up: env,errorx - use goutil/testutil/assert instead of stretchr/testify https://github.com/gookit/goutil/commit/35ca3bf6333fdc816c91774dce1c86de3e4b612a
    • up: fmt,json,net - use goutil/testutil/assert instead of stretchr/testify https://github.com/gookit/goutil/commit/4257e92e660088076e94f96c51ca335778597c5b
    • up: fs - add func WriteFile() for quick write contents to file https://github.com/gookit/goutil/commit/750c7271ecd2082764582405921718c3ee82e370
    • up: str - add some new str util func: TrimCut(), WrapTag() https://github.com/gookit/goutil/commit/85dac4cfe9a8f6f0d334494ae871ca265b2225ef
    • up: str - use goutil/testutil/assert instead of stretchr/testify https://github.com/gookit/goutil/commit/1e7ab9647192b8c867e718ed7e9de3a55312ba8f
    • up: reflects - update the func SliceSubKind() logic https://github.com/gookit/goutil/commit/f58223fd877f48c319d0ec3ac0ad06cdc66e6aec
    • up: map - update the SetByPath some logic for deep set value https://github.com/gookit/goutil/commit/f41222f1ec3b638f66921a5299479182a87a6f65
    • up: map - update some map deep set value logic and up readme https://github.com/gookit/goutil/commit/4bcc5c2763ad847f1f0552ec3f010ffecacd2b27
    • up: fix pkg assert build error, optimize some str func https://github.com/gookit/goutil/commit/cb44eff806ea87e8e8208d02a0b5fa5ca771b61c
    • up: fs - update file create and write logic for use easy https://github.com/gookit/goutil/commit/1c9aab4c031903821a82009ce0c7d528da19da78
    • up: map - update some method logic and add new method for Map, SMap https://github.com/gookit/goutil/commit/30163f8900a590be94655e161dcac69c6540543f
    • up: reflects - add new func IsEmptyValue(), update some tests https://github.com/gookit/goutil/commit/5abac5beb32842e803550b728066516371133906
    • up: map - update some logic for deep set value to map https://github.com/gookit/goutil/commit/cd665f4c2edb2dce06f5578a193dd029258bb6d6

    Other

    • chore: update readme template contents, add readme for arr pkg https://github.com/gookit/goutil/commit/cdb8c98d501e0c8678ea55f6f3c6ea306752f1ce
    • chore: update assert return format and some code style https://github.com/gookit/goutil/commit/22131e9794f5fba1cb5fb3a6ae61285efa29260a
    • build(deps): bump golang.org/x/text from 0.3.0 to 0.3.7 https://github.com/gookit/goutil/commit/151f69ac2a7045172bfebab347a449321fc1ebe4
    • build(deps): bump morphy2k/revive-action from 2.3.1 to 2.4.0 https://github.com/gookit/goutil/commit/9806dc0ed7f15dad21b27b07e6869bfda6b25144
    • chore: update release script and re-gen readme https://github.com/gookit/goutil/commit/622d064d84ef6be13668341905f6ea2cd0c1522f
    Source code(tar.gz)
    Source code(zip)
  • 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)

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 2 Aug 19, 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 1.2k Dec 30, 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 41 Jan 2, 2023
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 Sep 27, 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 10 Sep 7, 2022