A utils package in a Golang project typically contains a collection of utility functions and types that can be used across the project. The exact contents can vary based on the needs of the project, but here are some common utilities that might be included:
arrutil: Array/Slice util functions. For example, check, convert, formatting, enum, collections. cliutil: Command-line util functions. For example, colored print, read input, exec command. envutil: ENV util for current runtime env information. For example, get one, get info, parse var. fmtutil: Format data util functions. For example, data, size, time. fsutil: Filesystem util functions, quick create, read and write file. For example, file and dir check, operate. goinfo: Provide some standard util functions for go. jsonutil: Provide some util functions for quick read, write, encode, decode JSON data. maputil: Map data util functions. For example, convert, sub-value get, simple merge. mathutil: Math (int, number) util functions. For example, convert, math calc, random. netutil: Network util functions. For example, Ip, IpV4, IpV6, Mac, Port, Hostname, etc. reflects: Provide extends reflect util functions. structs: Provide some extends util functions for struct. For example, tag parse, struct data init. strutil: String util functions. For example, bytes, check, convert, encode, format and more. sysutil: System util functions. For example, sysenv, exec, user, process.