(資料圖片僅供參考)
本篇文章帶大家聊聊GO工具庫goutil的最新更新情況,介紹了gookit/goutil Go常用功能的擴展工具庫,都包含哪些知識,附更新日志,希望對大家有所幫助!
gookit/goutil Go 常用功能的擴展工具庫。包含:數字,字符串,slice/數組,Map ,結構體,反射,文件,錯誤處理,時間日期,CLI ,命令運行,系統信息,格式化,常用信息獲取等等
v0.6.2 到 v0.6.4 更新日志
版本更新日志 github.com/gookit/goutil/releases/...
發布于 2023.02.11 下面是 v0.6.2 到 v0.6.4 的累計更新
Feature
? feat: str - 新增檢查方法 ContainsOne, ContainsAll, HasEmpty, IsAllEmpty 等 0e4792a? feat: str/textutil - 支持快速替換給定文本的變量 ecc23cb? feat: sys,proc - 添加和更新一些實用函數 aa78114? feat: fs - 添加一些實用函數 NewIOReader,TextScanner,LineScanner,ReadFile,ReadString 等 3352512? feat: map, struct - 新增實用函數 structs.ToString(), maputil.Data.Uint() 90af09e? feat: stdio - 新增實用函數 NewIOReader, NewScanner ea243d6? feat: arr - 新增檢查函數 NotIn, In, ContainsAll/IsParent 2a18ca2? feat: textutil - 新增函數 IsMatchAll() 快速檢查文本是否有關鍵字 d0dade8? feat: math - 新增泛型函數 Max, SwapMax 比較和交換值 176923bfeat: error, test - 新增工具函數 快速斷言并返回錯誤或直接 panic 7188216? feat: fs - 新增函數 MkDirs, MkSubDirs 批量創建目錄或子目錄 c4447cb? feat: env,sys - 新增函數 EnvPaths, SearchEnvKeys, SearchEnv 快速獲取和搜索環境變量 b3d7669? feat: str - 新增函數 IEqual, IContains 忽略大小寫檢查字符串 746eb35? feat: goutil - 新增函數 CallOn, CallOrElse, OrError, OrValue, OrReturn 基于條件運行或返回值 97a2863? feat: arr - 新增函數 StringsAsInts, StringsTryInts, ConvType 等快速轉換 slice 類型 75d8d89? feat: reflects - 新增函數 ConvSlice 通過反射方式轉換 slice 類型 f87fc86? feat: structs - 初始化結構體 InitDefaults() 新增支持 slice 類型字段 948fa70? feat: byte - 新增函數 StrOrErr(), SafeString() 檢查并在無錯誤時轉為 string 767ed80? feat: cmdr - cmdr.Cmd 新增方法 ToOSStdoutStderr, ToOSStdout 快速設置命令輸出到 OS stdout, stderr 6aaea78
Fixed
? fix(env, str): fix the envutil test error and update some str util 2e7aa63? fix(dump): makeslice: cap out of range. fix: #76 4ba9b10? fix: textscan - fix multi inline comments parse error bf68c94
Update
? up: str, math - 新增一些 OrElse() 等快速檢測同時獲取值的函數 cb21fbc? up: str - update some util func and add more tests a3e07f4? up: str,math - update some util func eaf0990? up: str,byte - add and update some util func cf5d34e? up: byte,cflag - update and add some new tests 6e47f69? up(env, str): 調整 ENV 變量解析邏輯 和新增 strutil.Valid() 5193849? up(str): update some str value get func 676fe4e? up(env,sys): 新增 GetMulti, SetEnvMap, UnsetEnvs 等函數 9eaddb5? up(str): 調整 SplitInlineComment() 處理邏輯 31445cd? up(sys): 調整 SearchPath() 邏輯, 支持限制返回結果數 67cbae1? up(sys,env,map): add more tests case for util func 392536c? up(fs,sys): update some fs and sys util func run logic 7727628? up(struct): update some structs comments and update readme f461852? up(str): update some string util comments and func 796d1fe
Other
build(deps): bump golang.org/x/text from 0.5.0 to 0.6.0 79d7781doc: re-generate the README docs 42e3084doc: update the doc parse logic, support generic types 030676ddoc: generate and update README docs f342e92build(deps): bump golang.org/x/text from 0.6.0 to 0.7.0 1e3ea77
【相關推薦:Go視頻教程】
以上就是GO goutil發布了v0.6.4版!更新速覽!的詳細內容,更多請關注php中文網其它相關文章!
關鍵詞:
Golang