Skip to content

Releases: gookit/goutil

v0.5.11

03 Sep 17:30
Compare
Choose a tag to compare

Change Log

Feature

  • feat: structs - init object support parse Env var on struct tag default 39e9cd6
  • feat: sys - add new util funcs and add Cmd for quick build exec.Cmd 872f586
  • feat: timex - add new methods for auto parse date to time.Time d03c4c1
  • feat: sys - add new util func EnvPaths(), SearchPath() 0613a10
  • feat: sys - add new sub pkg sysutil/cmdr for build cmd and batch run tasks eafd6c6
  • feat: str - add new func IsVersion check version number 8d0994c
  • feat: structs - add new func SetValues for set struct field values 4391dcf
  • feat: reflects - add new func ValueByType and SetValue, add more unit tests 06d29d1

Update

  • up: structs - update the Value some methods, add more unit tests cef0274
  • up: arr,cli - add more util funcs StringsMap(), OutputLines() b70616e
  • up: update some func comments and update deps a5d2441
  • up: update some for run sys cmd, update deps d55b591
  • up: str - update the ToTime logic for support more layout sample c200a42
  • up: timex - update some util funcs, add more unit tests afa5abf
  • up: env - update some util funcs, mv parse env var to internal/comfunc d318d81
  • up: sys - update some util funcs and some comments cbf1222
  • up: structs - update tag parse rm dep the envutil, add more tests d27973e
  • up: str, math - update some util func, add more tests a3a3594
  • up: arr, cli - add new methods to Strings, mv a func to internal 4ef62b0
  • up: str, common - mv ToBool func to internal pkg 6a06051
  • up: sys - mv Cmd struct and logic to sub pkg sysutil/cmdr 5e15866
  • up: sys - update some for cmd build and run logic 2436284
  • up: env - rename the comfunc.ParseValue to comfunc.ParseEnvVar 3d8a544
  • up: str, map - add more unit tests and update some comments 30ab6b9

Other

  • test: fix some tests run error, up readme 9a8762f
  • test: fix sysutil/cmdr test error on action 328cb7c
  • test: fix strutil test error on action go1.18 c3cc6fd
  • doc: update some pkg docs, re-generate README ec85370
  • docs: add some README to sub pkg, re-generate top README c867d45
  • chore: update the go.sum and update readme d31c526

v0.5.10

28 Aug 08:01
Compare
Choose a tag to compare

Change Log

Feature

  • feat: structs - InitDefaults() can init a struct by default tag a83c4b2
  • feat: reflect - add some new util functions. eg: BaseTypeVal(), ValueByKind() f24965f
  • feat: goutil - add commonly convert, check util functions to top package 202b7ad

Update

  • up: str - add new func NoCaseEq for check two string is equals fe47518
  • up: test - add new func ErrIs for check two err is equals f43767b
  • up: structs - update the to map logic, support handle sub-struct a3ac95f
  • up: structs - update the struct tags collect and parse logic, support handle sub-struct 10265c9
  • up: std, str - update some util func, update some comments 97eb6db
  • up: update deps, remove dep the pkg stretchr/testify 836329f
  • up: structs - refactor the options logic for conv struct to map 246785b
  • up: structs - enhance the init struct default value logic, add more tests 972be5c

Other

  • chore: update some sub package docs on README f088462
  • test: fix imports error on tests for pkg errorx 8220003
  • docs: re-generate README for update docs 73059d2
  • test: add more unit tests for pkg reflects, std, sys, test 640c5c6
  • test: update and add more unit tests for pkg /strutil f8ac90a
  • test: update and add more unit tests for pkg cli, net, structs, goutil 96d610d

v0.5.9

17 Aug 16:27
Compare
Choose a tag to compare

Change Log

Feature

  • feat: str - add some new func Indent(), IndentBytes() and more 4f9cd9f
  • feat: str - add new func Unquote() for remove start and end quotes 0928025
  • feat: cli - add new func ShellQuote() quote a string on contains ', ", SPACE fb556b3

Update

  • up: map - add some new method to Data, SMap bea6c4e
  • up: structs - update some comments and rename MapDataStore to DataStore 8c33ace
  • up: map - update the deep set value func logic, add more tests 4819b15
  • up: map - update the MakeByKeys(), support make slice on last key like 'key[2] 3385cec
  • up: map - update the Data.SetByKeys(), fix set value fail on Data is empty 8662480
  • up: assert - add new assert func IsKind() for check reflect Kind dd38148
  • up: str - update the strutil.Value use pointer for struct methods 1a07103
  • up: dump,structs - use built in assert instead of stretchr/testify 7d99e1d
  • up: cliutil - use built in assert instead of stretchr/testify 2468fe6
  • up: sys - use built in assert instead of stretchr/testify 4062fe5
  • up: fs - use built in assert instead of stretchr/testify 0e31ea1
  • up: map - enhance for deep set value, add more test cases bd3fe2e
  • up: map - update some for Data, add more test cases for SetByPath() 0abb7cb
  • up: update some method for map.Data, add test on go1.19 2ad3436

Other

  • chore: maputil - remove debug dump codes 6a2622b
  • build(deps): bump github.com/mattn/go-isatty from 0.0.14 to 0.0.16 f867510
  • chore: update readme and re-generate readme docs 6c94a84

v0.5.8

11 Aug 16:07
Compare
Choose a tag to compare

Change Log

Fixed

  • fix: cflag - ReplaceShorts() should support replace '-n=tom' -> '--name=tom ec30cf1

Feature

  • feat: maputil - add HasAllKeys() for check map keys exists ce64d2a
  • feat: testutil/assert - add ContainsKeys() for check map keys exists aeaefef
  • feat: reflects - add new util func SliceSubKind() 8e30e14
  • feat: mathutil - add new util func Compare(), CompInt64(), CompFloat() 4342ae9
  • feat: map - update some maputil.Data method, add new func SetByPath() aa5c99a
  • feat: map - add SetByPath(),SetByKeys() for deep set value on map data bcf556b
  • feat: str - add new func Utf8Width() for calc string width 149b651
  • feat: str - add func RuneWidth, Utf8Truncate,Utf8Split for handle utf8 string de24975
  • feat: map - complete the deep set value to map func SetByPath() a0654b8

Update

  • up: errorx - remove depend on the mathutil package 994524a
  • up: arrutil - remove depend on the stretchr/testify package 814318d
  • up: maputil - update some map util func logic f395939
  • up: maputil - use goutil/testutil/assert instead of stretchr/testify/assert 3f24613
  • up: arr,cflag,math,reflects - use goutil/testutil/assert instead of stretchr/testify 3217599
  • up: stdio,structs,test,timex - use goutil/testutil/assert instead of stretchr/testify ed1aa28
  • up: env,errorx - use goutil/testutil/assert instead of stretchr/testify 35ca3bf
  • up: fmt,json,net - use goutil/testutil/assert instead of stretchr/testify 4257e92
  • up: fs - add func WriteFile() for quick write contents to file 750c727
  • up: str - add some new str util func: TrimCut(), WrapTag() 85dac4c
  • up: str - use goutil/testutil/assert instead of stretchr/testify 1e7ab96
  • up: reflects - update the func SliceSubKind() logic f58223f
  • up: map - update the SetByPath some logic for deep set value f41222f
  • up: map - update some map deep set value logic and up readme 4bcc5c2
  • up: fix pkg assert build error, optimize some str func cb44eff
  • up: fs - update file create and write logic for use easy 1c9aab4
  • up: map - update some method logic and add new method for Map, SMap 30163f8
  • up: reflects - add new func IsEmptyValue(), update some tests 5abac5b
  • up: map - update some logic for deep set value to map cd665f4

Other

  • chore: update readme template contents, add readme for arr pkg cdb8c98
  • chore: update assert return format and some code style 22131e9
  • build(deps): bump golang.org/x/text from 0.3.0 to 0.3.7 151f69a
  • build(deps): bump morphy2k/revive-action from 2.3.1 to 2.4.0 9806dc0
  • chore: update release script and re-gen readme 622d064

v0.5.7

11 Jul 16:59
Compare
Choose a tag to compare

Change Log

Fixed

  • fix: sysutil - read clipboard contents not works on Windows cd05cae
  • fix: sysutil - read clipboard at Windows, will always return end of the \r\n f3fc713

Feature

  • feat: maputil - add HasKey() for check map key exists e240757
  • feat: stdutil - add new check util func IsEqual(),IsContains() 69a0c61
  • feat: testutil/assert - add new assert util func Contains(), NotContains() 40b2f44
  • feat: arrutil - add new util func StringsFilter() 71b3271

Update

  • up: cflag - update the command args binding logic 6d8c891
  • up: testutil/assert - update some assert func logic 233578f
  • up: cflag - add a new util func FilterNames() baca9d5

Other

  • chore: update cflag readme and update ./README a70984f
  • chore: update the cflag readme usage docs 3cbc5d7

v0.5.6

08 Jul 05:30
Compare
Choose a tag to compare

Change Log

Fixed

  • fix: std - fix value len check error on input ptr value 59add30
  • fix: sysutil - build error on Windows efde758
  • fix: dump - add a read lock on record visit logs, issues: #54 efbd2b0

Feature

  • new: add cliutil.SuccessX method for print success style message be9eb6f
  • feat: sysutil - add OpenBrowser for open URL on default browser 81a9a29
  • feat: strutil - add *Slashes func for encode given string f1b1226
  • feat: sysutil - add new sub pkg clipboard for operate OS Clipboard 11ef857
  • feat: testutil/assert - add all assert func to Assertions struct as method ee629c5

Update

  • up: add new methods for reflects.Value and add some tests 18bf238
  • up: reflects - add some new util func and with more unit tests 1b71758
  • up: test - add a wraps bytes buffer for tests 491a8ef
  • up: add some new stdio util func for quiet print data 9b092ef
  • up: testutil - update some test util func and add readme 91783da
  • up: update some common info, add internal/gencode cmd 8946f24
  • up: reflects - add more reflact util functions 1047e05
  • up: sysutil - add stack info fetch func and add readme 47e8fc6
  • up: strutil - fix an error for str repeat func 079a35d
  • up: stdutil - update some std util func logic 557aa47
  • up: testutil - add new sub pkg: assert for help the unit testing 1a5208e
  • up: clipboard - update some read/write file error, add more unit tests 442caea
  • up: sysutil - add more unit tests for find exec file a3184d3
  • up: assert - add more assert test util functions 08cd71c
  • up: str,timex - add ToDuration func for parse string to duration d613e2f
  • up: fsutil - add SplitPath func for split path to dir path and file name f1a1967
  • up: fmtutil - add SizeToString func for parse size string to byte size 8dc788f
  • up: sysutil - fix unit test error and update some tests 750f105
  • up: strutil - update some str util func and add some unit tests c589e60
  • up: cflag - update some parse logic and add new util func ba279a5
  • up: testutil - add a new asset func StrContains ea08fe5
  • up: sysutil - add a simple pidFile implements and add some consts 3fe3549
  • up: structs - add some new methods for Value struct 2729fca
  • up: update cflag argument struct field name 41e0f0a
  • up: cflag - add some new func for render flag help 21791ed

Other

  • build(deps): bump github.com/stretchr/testify from 1.7.4 to 1.7.5 1870903
  • chore: update readme gen cmd, re-generate readme 17ab736
  • build(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0 cc39bf5
  • chore: update and re-generate the readme a788c73
  • chore: update some for gen readme and re-generate readme 2226a7c

v0.5.5

23 Jun 06:37
Compare
Choose a tag to compare

Change Log

Feature

  • feat: add a simple extends flag package clitul/cflag b66a961
  • feat: refactor the cliutil/cflag logic, support shorts and validator 47b4445

Update

  • update: update some str util functions, add more convert func 8fbc2fd
  • update: remove the outside value.go file, only keep a alias type b9023eb
  • update: move the stdutil/value to the structs package 74f7fd9
  • up: update the struct tags parse func logic de42d06
  • up: update action yml, add more unit tests for sub pkg 83643b9
  • up: update some const, refactor gendoc use cflag pkg e948e79
  • up: move the cflag pkg to root dir, update some examples aebc042

Other

  • chore: update the dump perview images 0063fbd
  • chore: update some comments and update check on action ff72b3f
  • chore: update some comments for fix code check error 61f6991
  • build(deps): bump github.com/stretchr/testify from 1.7.2 to 1.7.3 0f35937
  • chore: update and fix some unit tests error 1db8c02
  • chore: add more unit tests for some pkg 07765d2
  • build(deps): bump github.com/stretchr/testify from 1.7.3 to 1.7.4 45d367a
  • chore: add some tests for fsutil/finder f33d4ed
  • chore: update readme generate, re-gen for some new utils d4d8f51
  • chore: update the cflag pkg readme, add more usage 4b5e559

v0.5.4

12 Jun 06:11
Compare
Choose a tag to compare

Change Log

Refactor

  • refactor: refactoring the timex date template to layout logic 1a93937

Other

  • build(deps): bump github.com/gookit/color from 1.5.0 to 1.5.1 31a8b24
  • chore: update readme gen script, re-generate readme bc6014b
  • chore: re-generate readme and add some tests 2a01182
  • ci: fix unit tests error on run gh action 199f2a5
  • chore: re-generate readme for timex pkg 5f526d1

v0.5.3

11 Jun 05:27
Compare
Choose a tag to compare

Change Log

Refactor

  • refactor: refactoring the fsutil.Finder, move to fsutil/finder pkg df703fc
  • refactor: refactoring the arr and map formatter logic a2681c6
  • refactor: refactoring the math util compare func 690fa3b

Fixed

  • fix bugs; add unit tests for collection ce8323f

Feature

  • feat: add str util: strutil.Buffer, a extended bytes.Buffer 53dd0b2
  • feat(map): add more map util functions 43d9c2a
  • feat(cli): add some commonly color print func 1f71958
  • feat: implement new array data formatter arrutil.ArrFormatter{} aa24218
  • feat: add enhanced reflect func pkg: reflects 652ddd0
  • feat: add xxOrErr convert func for str, math pkg c680246
  • feat: add more util func to fsutil package f6f14a1
  • feat: add TestWriter util struct to testutil package 43016da

Update

  • up: update gh action flow setting 365ff00
  • ci: update some for action config b26a55f
  • ci: update some for action config2 99327b6
  • up: update action, will auto generate changelog on release 4a9d090
  • up: add more extend func for maputil.Data 642a5ba
  • up: update some info for arr, errorx, str util a30e8a9
  • up: add new func for quiet convert data type 04c9faf
  • up: rename the strutil.Str to StrVal, add unit tests acb0d7f
  • up: update struct data, go.sum and add ioutil func 6127faf
  • up: rename numutil pkg to numbers pkg 6f2769b
  • up: update some for string convert and encode func acc6ab7
  • up: update some fs util and sys util 488660e
  • up: remove goutil.Value logic, link alias to stdutil.Value 4fad43e
  • up: update some for reflects.BKind, add more tests 1f2107f
  • up: use os.UserHomeDir instead of the mitchellh/go-homedir pkg d56e630
  • up: move some sys util func to internal/comfunc pkg bddc281
  • up: update some for map data use logic 62ef51c
  • chore: update some readme, re-gen readme ad8e617
  • up: add readme and add more uint tests for cliutil ff2ed70
  • up: move some fs util functions to new pkg stdio 041802f
  • up: add more unit tests for structs pkg 363cfe4
  • up: update some fs util pkg, add more unit tests 5a8002e

Other

  • chore(ci): add go code style check on gh action 4d392d7
  • chore(ci): delete check go1.14 from gh action 1e4a287
  • add comment for collection functions 0eefe08
  • style: add name prefix for functions and types afca2e3
  • ci: use setup-go-faster instead setup-go action 44199ee
  • test: remove unused var value 606fcff
  • build(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.2 0e798ae
  • chore: up readme, re-generate readme docs 8d10730

v0.5.2

08 May 15:40
Compare
Choose a tag to compare

Change Log

Feature

  • feat: pkg timex add more commonly used functions 3642341
  • feat: timex add new TimeX.CustomHMS for custom the hour, minute, second create time 8307e58
  • feat: add some std util func for reflect.Value 6593ddf
  • feat: add new func: fsutil.GlobWithFunc() 24acc7f
  • feat: add more env util func for get ENV value 5d71cba
  • feat: add more time util func on ./timex c09cdb9

Fixed

  • fix map to string panic when map is not nil but map is empty 54c380a

Update

  • up: update some maputil func, add morr unit tests 9da180a

Other

  • style: update readme add more util usage exampels 4f8a02d
  • style: update some sub pkg readme docs 14d7dbb
  • chore: add more unit tests for pkg timex c491815
  • chore: update readme and package desc de4a262

New Contributors

Full Changelog: v0.5.1...v0.5.2