utility

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package utility provides utility implementations.

Package utility provides utility implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllIpsOfCidr

func GetAllIpsOfCidr(cidr string) ([]string, error)

func GetTypeName

func GetTypeName(value any) string

GetTypeName is get the type name.

ex) typeName := utility.GetTypeName(int(1))

func WhetherCidrContainsIp

func WhetherCidrContainsIp(cidr, ip string) (bool, error)

Types

type CallerInfo

type CallerInfo struct {
	PackageName  string
	FileName     string
	FunctionName string
	Line         int
	GoroutineID  int
}

CallerInfo is a GetCallerInfo that has caller information.

func GetCallerInfo

func GetCallerInfo(numberOfStackFramesToAscend int) (CallerInfo, error)

GetCallerInfo is get the caller information.

ex) callerInfo, err := utility.GetCallerInfo()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL