Documentation ¶
Index ¶
- func BS16(v uint16) uint16
- func BS32(v uint32) uint32
- func ConvertIPToUint32(ip net.IP) uint32
- func ConvertUint32ToIP(nn uint32) net.IP
- func FileUnmarshalAsYaml(in string, v interface{}) error
- func GetClangVersion() (string, error)
- func GetIproute2Version() (string, string, error)
- func GetKernelVersion() (string, error)
- func KtimeToReal(ktime uint64) (uint64, error)
- func KtimeToRealMilli(ktimeMilli uint64) (uint64, error)
- func KtimeToRealNano(ktime uint64) (uint64, error)
- func LocalExecute(cmd string) (string, error)
- func LocalExecutef(fs string, a ...interface{}) (string, error)
- func NewCmdCompletion(rootCmd *cobra.Command) *cobra.Command
- func NewCommandVersion() *cobra.Command
- func NewTableWriter(writer io.Writer) *tablewriter.Table
- func SetLocalExecuteSilence(v bool)
- func TimeNow() uint64
- func TimeNowNano() uint64
- func UdpTransmit(local, remote string, buf *bytes.Buffer) error
- func VersionBuildDate() string
- func VersionGitBranch() string
- func VersionGitSHA() string
- func VersionGitTag() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertIPToUint32 ¶
func ConvertUint32ToIP ¶
func FileUnmarshalAsYaml ¶
func GetClangVersion ¶
GetClangVersion returns the version string of clang as semver-formant This string format can be compared by semver buitin package. ref: // https://pkg.go.dev/golang.org/x/mod/semver#Major clang may not work well because version output results may differ depending on the platform.
DOCKER-TESTED: [centos:centos7, ubuntu:22.04, fedora:37]
func GetIproute2Version ¶
func GetKernelVersion ¶
func KtimeToReal ¶
func KtimeToRealMilli ¶
func KtimeToRealNano ¶
func LocalExecute ¶
func LocalExecutef ¶
func NewCommandVersion ¶ added in v0.0.4
func NewTableWriter ¶
func NewTableWriter(writer io.Writer) *tablewriter.Table
func SetLocalExecuteSilence ¶
func SetLocalExecuteSilence(v bool)
func TimeNowNano ¶
func TimeNowNano() uint64
func VersionBuildDate ¶ added in v0.0.4
func VersionBuildDate() string
VersionBuildDate returns date when your binary is built
func VersionGitBranch ¶ added in v0.0.4
func VersionGitBranch() string
VersionGitBranch returns current Git branch name
func VersionGitSHA ¶ added in v0.0.4
func VersionGitSHA() string
VersionGitSHA returns Git hash string
func VersionGitTag ¶ added in v0.0.4
func VersionGitTag() string
VersionGitTag returns Git tag string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.