Documentation
¶
Overview ¶
Example (CalcAllow) ¶
str := []byte("FooBAR") fmt.Println(calcAlloc(str))
Output: 7
Index ¶
- func AddOperationToDocument(doc *openapi.Document, path string, op *openapi.Operation) (err error)
- func Caller(skip int) *runtime.Func
- func CallerName(skip int) string
- func CallerNameFromFunc(f *runtime.Func) string
- func CallerType(skip int) string
- func CallerTypeFromFunc(f *runtime.Func) string
- func EqualStructs[A, B any]() bool
- func IsPublicType(typ reflect.Type) bool
- func Must[T any](v T, err error) T
- func ParseBytes(s string) (int64, error)
- func ParseName(s string) (title, operationId string)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOperationToDocument ¶
func CallerName ¶
Example ¶
fmt.Println(CallerName(0))
Output: ExampleCallerName
func CallerNameFromFunc ¶ added in v0.6.0
func CallerType ¶
func CallerTypeFromFunc ¶ added in v0.6.0
func EqualStructs ¶
func IsPublicType ¶ added in v0.7.2
func ParseBytes ¶ added in v0.18.0
Example ¶
values := []string{"512", "1kb", "2MB", "1.5GiB", "3pb"} for _, v := range values { n, err := ParseBytes(v) if err != nil { fmt.Println("error:", err) continue } fmt.Println(n) }
Output: 512 1024 2097152 1610612736 3377699720527872
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.