Documentation
¶
Overview ¶
Package swag contains a bunch of helper functions for go-openapi and go-swagger projects.
You may also use it standalone for your projects.
NOTE: all features that were previously exposed as package-level members (constants, variables, functions and types) are now deprecated and are superseded by equivalent features in more specialized sub-packages.
Here is what is inside:
Module cmdutils:
- utilities to work with CLIs
Module conv:
- convert between value and pointers for builtin types
- convert from string to builtin types (wraps strconv)
Module fileutils:
- file upload type
- search in path
Module jsonname:
- json names for go properties
Module jsonutils:
- fast json concatenation
- read and write JSON from and to dynamic go data structures
Module loading:
- load from file or http
Module mangling:
- name mangling to generate clean identifiers
Module netutils:
- host, port from address
Module stringutils:
- find string in list
- join/split arrays of query parameters
Module typeutils:
- check the zero value of any type
Module yamlutils:
- converting YAML to JSON
- loading YAML into a dynamic YAML document
This repo has a few dependencies outside of the standard library:
- YAML utilities depend on gopkg.in/yaml.v3
- JSON utilities depend on github.com/mailru/easyjson
Index ¶
- Constants
- Variables
- func AddInitialisms(words ...string)deprecated
- func Bool(v bool) *booldeprecated
- func BoolMap(src map[string]bool) map[string]*booldeprecated
- func BoolSlice(src []bool) []*booldeprecated
- func BoolValue(v *bool) booldeprecated
- func BoolValueMap(src map[string]*bool) map[string]booldeprecated
- func BoolValueSlice(src []*bool) []booldeprecated
- func BytesToYAMLDoc(data []byte) (interface{}, error)deprecated
- func Camelize(word string) stringdeprecated
- func ConcatJSON(blobs ...[]byte) []bytedeprecated
- func ContainsStrings(coll []string, item string) booldeprecated
- func ContainsStringsCI(coll []string, item string) booldeprecated
- func ConvertBool(str string) (bool, error)deprecated
- func ConvertFloat32(str string) (float32, error)deprecated
- func ConvertFloat64(str string) (float64, error)deprecated
- func ConvertInt16(str string) (int16, error)deprecated
- func ConvertInt32(str string) (int32, error)deprecated
- func ConvertInt64(str string) (int64, error)deprecated
- func ConvertInt8(str string) (int8, error)deprecated
- func ConvertUint16(str string) (uint16, error)deprecated
- func ConvertUint32(str string) (uint32, error)deprecated
- func ConvertUint64(str string) (uint64, error)deprecated
- func ConvertUint8(str string) (uint8, error)deprecated
- func DynamicJSONToStruct(data interface{}, target interface{}) errordeprecated
- func FindInGoSearchPath(pkg string) stringdeprecated
- func FindInSearchPath(searchPath, pkg string) stringdeprecated
- func Float32(v float32) *float32deprecated
- func Float32Map(src map[string]float32) map[string]*float32deprecated
- func Float32Slice(src []float32) []*float32deprecated
- func Float32Value(v *float32) float32deprecated
- func Float32ValueMap(src map[string]*float32) map[string]float32deprecated
- func Float32ValueSlice(src []*float32) []float32deprecated
- func Float64(v float64) *float64deprecated
- func Float64Map(src map[string]float64) map[string]*float64deprecated
- func Float64Slice(src []float64) []*float64deprecated
- func Float64Value(v *float64) float64deprecated
- func Float64ValueMap(src map[string]*float64) map[string]float64deprecated
- func Float64ValueSlice(src []*float64) []float64deprecated
- func FormatBool(value bool) stringdeprecated
- func FormatFloat32(value float32) stringdeprecated
- func FormatFloat64(value float64) stringdeprecated
- func FormatInt16(value int16) stringdeprecated
- func FormatInt32(value int32) stringdeprecated
- func FormatInt64(value int64) stringdeprecated
- func FormatInt8(value int8) stringdeprecated
- func FormatUint16(value uint16) stringdeprecated
- func FormatUint32(value uint32) stringdeprecated
- func FormatUint64(value uint64) stringdeprecated
- func FormatUint8(value uint8) stringdeprecated
- func FromDynamicJSON(data, target interface{}) errordeprecated
- func FullGoSearchPath() stringdeprecated
- func Int(v int) *intdeprecated
- func Int32(v int32) *int32deprecated
- func Int32Map(src map[string]int32) map[string]*int32deprecated
- func Int32Slice(src []int32) []*int32deprecated
- func Int32Value(v *int32) int32deprecated
- func Int32ValueMap(src map[string]*int32) map[string]int32deprecated
- func Int32ValueSlice(src []*int32) []int32deprecated
- func Int64(v int64) *int64deprecated
- func Int64Map(src map[string]int64) map[string]*int64deprecated
- func Int64Slice(src []int64) []*int64deprecated
- func Int64Value(v *int64) int64deprecated
- func Int64ValueMap(src map[string]*int64) map[string]int64deprecated
- func Int64ValueSlice(src []*int64) []int64deprecated
- func IntMap(src map[string]int) map[string]*intdeprecated
- func IntSlice(src []int) []*intdeprecated
- func IntValue(v *int) intdeprecated
- func IntValueMap(src map[string]*int) map[string]intdeprecated
- func IntValueSlice(src []*int) []intdeprecated
- func IsFloat64AJSONInteger(f float64) booldeprecated
- func IsZero(data interface{}) booldeprecated
- func JoinByFormat(data []string, format string) []stringdeprecated
- func LoadFromFileOrHTTP(pth string, opts ...loading.Option) ([]byte, error)deprecated
- func LoadFromFileOrHTTPWithTimeout(pth string, timeout time.Duration, opts ...loading.Option) ([]byte, error)deprecated
- func LoadStrategy(pth string, local, remote func(string) ([]byte, error), opts ...loading.Option) func(string) ([]byte, error)deprecated
- func ReadJSON(data []byte, value interface{}) errordeprecated
- func SplitByFormat(data, format string) []stringdeprecated
- func SplitHostPort(addr string) (host string, port int, err error)deprecated
- func String(v string) *stringdeprecated
- func StringMap(src map[string]string) map[string]*stringdeprecated
- func StringSlice(src []string) []*stringdeprecated
- func StringValue(v *string) stringdeprecated
- func StringValueMap(src map[string]*string) map[string]stringdeprecated
- func StringValueSlice(src []*string) []stringdeprecated
- func Time(v time.Time) *time.Timedeprecated
- func TimeMap(src map[string]time.Time) map[string]*time.Timedeprecated
- func TimeSlice(src []time.Time) []*time.Timedeprecated
- func TimeValue(v *time.Time) time.Timedeprecated
- func TimeValueMap(src map[string]*time.Time) map[string]time.Timedeprecated
- func TimeValueSlice(src []*time.Time) []time.Timedeprecated
- func ToCommandName(name string) stringdeprecated
- func ToDynamicJSON(value interface{}) interface{}deprecated
- func ToFileName(name string) stringdeprecated
- func ToGoName(name string) stringdeprecated
- func ToHumanNameLower(name string) stringdeprecated
- func ToHumanNameTitle(name string) stringdeprecated
- func ToJSONName(name string) stringdeprecated
- func ToVarName(name string) stringdeprecated
- func Uint(v uint) *uintdeprecated
- func Uint16(v uint16) *uint16deprecated
- func Uint16Map(src map[string]uint16) map[string]*uint16deprecated
- func Uint16Slice(src []uint16) []*uint16deprecated
- func Uint16Value(v *uint16) uint16deprecated
- func Uint16ValueMap(src map[string]*uint16) map[string]uint16deprecated
- func Uint16ValueSlice(src []*uint16) []uint16deprecated
- func Uint32(v uint32) *uint32deprecated
- func Uint32Map(src map[string]uint32) map[string]*uint32deprecated
- func Uint32Slice(src []uint32) []*uint32deprecated
- func Uint32Value(v *uint32) uint32deprecated
- func Uint32ValueMap(src map[string]*uint32) map[string]uint32deprecated
- func Uint32ValueSlice(src []*uint32) []uint32deprecated
- func Uint64(v uint64) *uint64deprecated
- func Uint64Map(src map[string]uint64) map[string]*uint64deprecated
- func Uint64Slice(src []uint64) []*uint64deprecated
- func Uint64Value(v *uint64) uint64deprecated
- func Uint64ValueMap(src map[string]*uint64) map[string]uint64deprecated
- func Uint64ValueSlice(src []*uint64) []uint64deprecated
- func UintMap(src map[string]uint) map[string]*uintdeprecated
- func UintSlice(src []uint) []*uintdeprecated
- func UintValue(v *uint) uintdeprecated
- func UintValueMap(src map[string]*uint) map[string]uintdeprecated
- func UintValueSlice(src []*uint) []uintdeprecated
- func WriteJSON(data interface{}) ([]byte, error)deprecated
- func YAMLData(path string) (interface{}, error)deprecated
- func YAMLDoc(path string) (json.RawMessage, error)deprecated
- func YAMLMatcher(path string) booldeprecated
- func YAMLToJSON(data interface{}) (json.RawMessage, error)deprecated
- type CommandLineOptionsGroupdeprecated
- type Filedeprecated
- type JSONMapItemdeprecated
- type JSONMapSlicedeprecated
- type NameProviderdeprecated
- func NewNameProvider() *NameProviderdeprecated
Constants ¶
const GOPATHKey = fileutils.GOPATHKey
GOPATHKey represents the env key for gopath
Deprecated: use fileutils.GOPATHKey instead.
Variables ¶
var ( // LoadHTTPTimeout the default timeout for load requests. // // Deprecated: use [loading.WithTimeout] instead. LoadHTTPTimeout = 30 * time.Second // LoadHTTPBasicAuthUsername the username to use when load requests require basic auth. // // Deprecated: use [loading.WithBasicAuth] instead. LoadHTTPBasicAuthUsername = "" // LoadHTTPBasicAuthPassword the password to use when load requests require basic auth. // // Deprecated: use [loading.WithBasicAuth] instead. LoadHTTPBasicAuthPassword = "" // LoadHTTPCustomHeaders an optional collection of custom HTTP headers for load requests. // // Deprecated: use [loading.WithCustomHeaders] instead. LoadHTTPCustomHeaders = map[string]string{} )
var DefaultJSONNameProvider = jsonname.DefaultJSONNameProvider
DefaultJSONNameProvider is the default cache for types
Deprecated: use jsonname.DefaultJSONNameProvider instead.
var GoNamePrefixFunc mangling.PrefixFunc
GoNamePrefixFunc sets an optional rule to prefix go names which do not start with a letter.
GoNamePrefixFunc should not be written to while concurrently using the other mangling functions of this package.
Deprecated: use mangling.WithGoNamePrefixFunc instead.
Functions ¶
func AddInitialisms
deprecated
func AddInitialisms(words ...string)
AddInitialisms adds additional initialisms to the default list (see mangling.DefaultInitialisms).
AddInitialisms is not safe to be called concurrently.
Deprecated: use mangling.WithAdditionalInitialisms instead.
func Bool
deprecated
Bool turn a pointer to of the bool value passed in.
Deprecated: use conv.Pointer instead.
func BoolSlice
deprecated
BoolSlice converts a slice of bool values into a slice of bool pointers.
Deprecated: use conv.PointerSlice instead.
func BoolValue
deprecated
BoolValue turn the value of the bool pointer passed in or false if the pointer is nil.
Deprecated: use conv.Value instead.
func BoolValueMap
deprecated
BoolValueMap converts a string map of bool pointers into a string map of bool values.
Deprecated: use conv.ValueMap instead.
func BoolValueSlice
deprecated
BoolValueSlice converts a slice of bool pointers into a slice of bool values.
Deprecated: use conv.ValueSlice instead.
func BytesToYAMLDoc
deprecated
BytesToYAMLDoc converts a byte slice into a YAML document
Deprecated: use yamlutils.BytesToYAMLDoc instead.
func Camelize
deprecated
Camelize a single word.
Deprecated: use mangling.NameMangler.Camelize instead.
func ConcatJSON
deprecated
ConcatJSON concatenates multiple JSON objects efficiently.
Deprecated: use jsonutils.ConcatJSON instead.
func ContainsStrings
deprecated
ContainsStrings searches a slice of strings for a case-sensitive match.
Deprecated: use slices.Contains or stringutils.ContainsStrings instead.
func ContainsStringsCI
deprecated
ContainsStringsCI searches a slice of strings for a case-insensitive match.
Deprecated: use stringutils.ContainsStringsCI instead.
func ConvertBool
deprecated
ConvertBool turns a string into a boolean.
Deprecated: use conv.ConvertBool instead.
func ConvertFloat32
deprecated
ConvertFloat32 turns a string into a float32.
Deprecated: use conv.ConvertFloat32 instead. Alternatively, you may use the generic version conv.ConvertFloat.
func ConvertFloat64
deprecated
ConvertFloat64 turns a string into a float64.
Deprecated: use conv.ConvertFloat64 instead. Alternatively, you may use the generic version conv.ConvertFloat.
func ConvertInt16
deprecated
ConvertInt16 turns a string into an int16.
Deprecated: use conv.ConvertInt16 instead. Alternatively, you may use the generic version conv.ConvertInteger.
func ConvertInt32
deprecated
ConvertInt32 turns a string into an int32.
Deprecated: use conv.ConvertInt32 instead. Alternatively, you may use the generic version conv.ConvertInteger.
func ConvertInt64
deprecated
ConvertInt64 turns a string into an int64.
Deprecated: use conv.ConvertInt64 instead. Alternatively, you may use the generic version conv.ConvertInteger.
func ConvertInt8
deprecated
ConvertInt8 turns a string into an int8.
Deprecated: use conv.ConvertInt8 instead. Alternatively, you may use the generic version conv.ConvertInteger.
func ConvertUint16
deprecated
ConvertUint16 turns a string into an uint16.
Deprecated: use conv.ConvertUint16 instead. Alternatively, you may use the generic version conv.ConvertUinteger.
func ConvertUint32
deprecated
ConvertUint32 turns a string into an uint32.
Deprecated: use conv.ConvertUint32 instead. Alternatively, you may use the generic version conv.ConvertUinteger.
func ConvertUint64
deprecated
ConvertUint64 turns a string into an uint64.
Deprecated: use conv.ConvertUint64 instead. Alternatively, you may use the generic version conv.ConvertUinteger.
func ConvertUint8
deprecated
ConvertUint8 turns a string into an uint8.
Deprecated: use conv.ConvertUint8 instead. Alternatively, you may use the generic version conv.ConvertUinteger.
func DynamicJSONToStruct
deprecated
func DynamicJSONToStruct(data interface{}, target interface{}) error
DynamicJSONToStruct converts an untyped JSON structure into a target data type.
Deprecated: use jsonutils.FromDynamicJSON instead.
func FindInGoSearchPath
deprecated
FindInGoSearchPath finds a package in the $GOPATH:$GOROOT
Deprecated: use fileutils.FindInGoSearchPath instead.
func FindInSearchPath
deprecated
FindInSearchPath finds a package in a provided lists of paths.
Deprecated: use fileutils.FindInSearchPath instead.
func Float32
deprecated
added in
v0.19.9
Float32 turn a pointer to of the float32 value passed in.
Deprecated: use conv.Pointer instead.
func Float32Map
deprecated
added in
v0.19.9
Float32Map converts a string map of float32 values into a string map of float32 pointers.
Deprecated: use conv.PointerMap instead.
func Float32Slice
deprecated
added in
v0.19.9
Float32Slice converts a slice of float32 values into a slice of float32 pointers.
Deprecated: use conv.PointerSlice instead.
func Float32Value
deprecated
added in
v0.19.9
Float32Value turn the value of the float32 pointer passed in or 0 if the pointer is nil.
Deprecated: use conv.Value instead.
func Float32ValueMap
deprecated
added in
v0.19.9
Float32ValueMap converts a string map of float32 pointers into a string map of float32 values.
Deprecated: use conv.ValueMap instead.
func Float32ValueSlice
deprecated
added in
v0.19.9
Float32ValueSlice converts a slice of float32 pointers into a slice of float32 values.
Deprecated: use conv.ValueSlice instead.
func Float64
deprecated
Float64 turn a pointer to of the float64 value passed in.
Deprecated: use conv.Pointer instead.
func Float64Map
deprecated
Float64Map converts a string map of float64 values into a string map of float64 pointers.
Deprecated: use conv.PointerMap instead.
func Float64Slice
deprecated
Float64Slice converts a slice of float64 values into a slice of float64 pointers.
Deprecated: use conv.PointerSlice instead.
func Float64Value
deprecated
Float64Value turn the value of the float64 pointer passed in or 0 if the pointer is nil.
Deprecated: use conv.Value instead.
func Float64ValueMap
deprecated
Float64ValueMap converts a string map of float64 pointers into a string map of float64 values.
Deprecated: use conv.ValueMap instead.
func Float64ValueSlice
deprecated
Float64ValueSlice converts a slice of float64 pointers into a slice of float64 values.
Deprecated: use conv.ValueSlice instead.
func FormatBool
deprecated
FormatBool turns a boolean into a string.
Deprecated: use conv.FormatBool instead.
func FormatFloat32
deprecated
FormatFloat32 turns a float32 into a string.
Deprecated: use conv.FormatFloat instead.
func FormatFloat64
deprecated
FormatFloat64 turns a float64 into a string.
Deprecated: use conv.FormatFloat instead.
func FormatInt16
deprecated
FormatInt16 turns an int16 into a string.
Deprecated: use conv.FormatInteger instead.
func FormatInt32
deprecated
FormatInt32 turns an int32 into a string
Deprecated: use conv.FormatInteger instead.
func FormatInt64
deprecated
FormatInt64 turns an int64 into a string.
Deprecated: use conv.FormatInteger instead.
func FormatInt8
deprecated
FormatInt8 turns an int8 into a string.
Deprecated: use conv.FormatInteger instead.
func FormatUint16
deprecated
FormatUint16 turns an uint16 into a string.
Deprecated: use conv.FormatUinteger instead.
func FormatUint32
deprecated
FormatUint32 turns an uint32 into a string.
Deprecated: use conv.FormatUinteger instead.
func FormatUint64
deprecated
FormatUint64 turns an uint64 into a string.
Deprecated: use conv.FormatUinteger instead.
func FormatUint8
deprecated
FormatUint8 turns an uint8 into a string.
Deprecated: use conv.FormatUinteger instead.
func FromDynamicJSON
deprecated
func FromDynamicJSON(data, target interface{}) error
FromDynamicJSON turns a go value into a properly JSON typed structure.
"Dynamic JSON" refers to what you get when unmarshaling JSON into an untyped interface{}, i.e. objects are represented by map[string]interface{}, arrays by []interface{}, and all scalar values are interface{}.
Deprecated: use jsonutils.FromDynamicJSON instead.
func FullGoSearchPath
deprecated
func FullGoSearchPath() string
FullGoSearchPath gets the search paths for finding packages
Deprecated: use fileutils.FullGoSearchPath instead.
func Int
deprecated
Int turn a pointer to of the int value passed in.
Deprecated: use conv.Pointer instead.
func Int32
deprecated
Int32 turn a pointer to of the int32 value passed in.
Deprecated: use conv.Pointer instead.
func Int32Slice
deprecated
Int32Slice converts a slice of int32 values into a slice of int32 pointers.
Deprecated: use conv.PointerSlice instead.
func Int32Value
deprecated
Int32Value turn the value of the int32 pointer passed in or 0 if the pointer is nil.
Deprecated: use conv.Value instead.
func Int32ValueMap
deprecated
Int32ValueMap converts a string map of int32 pointers into a string map of int32 values.
Deprecated: use conv.ValueMap instead.
func Int32ValueSlice
deprecated
Int32ValueSlice converts a slice of int32 pointers into a slice of int32 values.
Deprecated: use conv.ValueSlice instead.
func Int64
deprecated
Int64 turn a pointer to of the int64 value passed in.
Deprecated: use conv.Pointer instead.
func Int64Slice
deprecated
Int64Slice converts a slice of int64 values into a slice of int64 pointers.
Deprecated: use conv.PointerSlice instead.
func Int64Value
deprecated
Int64Value turn the value of the int64 pointer passed in or 0 if the pointer is nil.
Deprecated: use conv.Value instead.
func Int64ValueMap
deprecated
Int64ValueMap converts a string map of int64 pointers into a string map of int64 values.
Deprecated: use conv.ValueMap instead.
func Int64ValueSlice
deprecated
Int64ValueSlice converts a slice of int64 pointers into a slice of int64 values.
Deprecated: use conv.ValueSlice instead.
func IntSlice
deprecated
IntSlice converts a slice of int values into a slice of int pointers.
Deprecated: use conv.PointerSlice instead.
func IntValue
deprecated
IntValue turn the value of the int pointer passed in or 0 if the pointer is nil.
Deprecated: use conv.Value instead.
func IntValueMap
deprecated
IntValueMap converts a string map of int pointers into a string map of int values.
Deprecated: use conv.ValueMap instead.
func IntValueSlice
deprecated
IntValueSlice converts a slice of int pointers into a slice of int values.
Deprecated: use conv.ValueSlice instead.
func IsFloat64AJSONInteger
deprecated
IsFloat64AJSONInteger allows for integers [-2^53, 2^53-1] inclusive.
Deprecated: use conv.IsFloat64AJSONInteger instead.
func IsZero
deprecated
func IsZero(data interface{}) bool
IsZero returns true when the value passed into the function is a zero value. This allows for safer checking of interface values.
Deprecated: use typeutils.IsZero instead.
func JoinByFormat
deprecated
JoinByFormat joins a string array by a known format (e.g. swagger's collectionFormat attribute).
Deprecated: use stringutils.JoinByFormat instead.
func LoadFromFileOrHTTP
deprecated
func LoadFromFileOrHTTPWithTimeout
deprecated
func LoadFromFileOrHTTPWithTimeout(pth string, timeout time.Duration, opts ...loading.Option) ([]byte, error)
LoadFromFileOrHTTPWithTimeout loads the bytes from a file or a remote http server based on the path passed in timeout arg allows for per request overriding of the request timeout.
Deprecated: use loading.LoadFileOrHTTP with the loading.WithTimeout option instead.
func ReadJSON
deprecated
ReadJSON reads json data.
Deprecated: use jsonutils.ReadJSON instead.
func SplitByFormat
deprecated
SplitByFormat splits a string by a known format.
Deprecated: use stringutils.SplitByFormat instead.
func SplitHostPort
deprecated
SplitHostPort splits a network address into a host and a port.
Deprecated: use netutils.SplitHostPort instead.
func String
deprecated
String turn a pointer to of the string value passed in.
Deprecated: use conv.Pointer instead.
func StringSlice
deprecated
StringSlice converts a slice of string values into a slice of string pointers.
Deprecated: use conv.PointerSlice instead.
func StringValue
deprecated
StringValue turn the value of the string pointer passed in or "" if the pointer is nil.
Deprecated: use conv.Value instead.
func StringValueMap
deprecated
StringValueMap converts a string map of string pointers into a string map of string values.
Deprecated: use conv.ValueMap instead.
func StringValueSlice
deprecated
StringValueSlice converts a slice of string pointers into a slice of string values.
Deprecated: use conv.ValueSlice instead.
func TimeValueMap
deprecated
func TimeValueSlice
deprecated
TimeValueSlice converts a slice of time.Time pointers into a slice of time.Time values
Deprecated: use conv.ValueSlice instead.
func ToCommandName
deprecated
ToCommandName lowercases and underscores a go type name.
Deprecated: use mangling.NameMangler.ToCommandName instead.
func ToDynamicJSON
deprecated
func ToDynamicJSON(value interface{}) interface{}
ToDynamicJSON turns a go value into a properly JSON untyped structure.
It is the same as FromDynamicJSON, but doesn't check for errors.
Deprecated: this function is a misnomer and is unsafe. Use jsonutils.FromDynamicJSON instead.
func ToFileName
deprecated
ToFileName lowercases and underscores a go type name.
Deprecated: use mangling.NameMangler.ToFileName instead.
func ToGoName
deprecated
ToGoName translates a swagger name which can be underscored or camel cased to a name that golint likes.
Deprecated: use mangling.NameMangler.ToGoName instead.
func ToHumanNameLower
deprecated
ToHumanNameLower represents a code name as a human series of words.
Deprecated: use mangling.NameMangler.ToHumanNameLower instead.
func ToHumanNameTitle
deprecated
ToHumanNameTitle represents a code name as a human series of words with the first letters titleized.
Deprecated: use mangling.NameMangler.ToHumanNameTitle instead.
func ToJSONName
deprecated
ToJSONName camel-cases a name which can be underscored or pascal-cased.
Deprecated: use mangling.NameMangler.ToJSONName instead.
func ToVarName
deprecated
ToVarName camel-cases a name which can be underscored or pascal-cased.
Deprecated: use mangling.NameMangler.ToVarName instead.
func Uint
deprecated
Uint turn a pointer to of the uint value passed in.
Deprecated: use conv.Pointer instead.
func Uint16
deprecated
added in
v0.19.9
Uint16 turn a pointer to of the uint16 value passed in.
Deprecated: use conv.Pointer instead.
func Uint16Slice
deprecated
added in
v0.19.9
Uint16Slice converts a slice of uint16 values into a slice of uint16 pointers.
Deprecated: use conv.PointerSlice instead.
func Uint16Value
deprecated
added in
v0.19.9
Uint16Value turn the value of the uint16 pointer passed in or 0 if the pointer is nil.
Deprecated: use conv.Value instead.
func Uint16ValueMap
deprecated
added in
v0.19.9
Uint16ValueMap converts a string map of uint16 pointers into a string map of uint16 values.
Deprecated: use conv.ValueMap instead.
func Uint16ValueSlice
deprecated
added in
v0.19.9
Uint16ValueSlice converts a slice of uint16 pointers into a slice of uint16 values.
Deprecated: use conv.ValueSlice instead.
func Uint32
deprecated
Uint32 turn a pointer to of the uint32 value passed in.
Deprecated: use conv.Pointer instead.
func Uint32Slice
deprecated
Uint32Slice converts a slice of uint32 values into a slice of uint32 pointers.
Deprecated: use conv.PointerSlice instead.
func Uint32Value
deprecated
Uint32Value turn the value of the uint32 pointer passed in or 0 if the pointer is nil.
Deprecated: use conv.Value instead.
func Uint32ValueMap
deprecated
Uint32ValueMap converts a string map of uint32 pointers into a string map of uint32 values.
Deprecated: use conv.ValueMap instead.
func Uint32ValueSlice
deprecated
Uint32ValueSlice converts a slice of uint32 pointers into a slice of uint32 values.
Deprecated: use conv.ValueSlice instead.
func Uint64
deprecated
Uint64 turn a pointer to of the uint64 value passed in.
Deprecated: use conv.Pointer instead.
func Uint64Slice
deprecated
Uint64Slice converts a slice of uint64 values into a slice of uint64 pointers.
Deprecated: use conv.PointerSlice instead.
func Uint64Value
deprecated
Uint64Value turn the value of the uint64 pointer passed in or 0 if the pointer is nil.
Deprecated: use conv.Value instead.
func Uint64ValueMap
deprecated
Uint64ValueMap converts a string map of uint64 pointers into a string map of uint64 values.
Deprecated: use conv.ValueMap instead.
func Uint64ValueSlice
deprecated
Uint64ValueSlice converts a slice of uint64 pointers into a slice of uint64 values.
Deprecated: use conv.ValueSlice instead.
func UintSlice
deprecated
UintSlice converts a slice of uint values into a slice of uint pointers.
Deprecated: use conv.PointerSlice instead.
func UintValue
deprecated
UintValue turn the value of the uint pointer passed in or 0 if the pointer is nil.
Deprecated: use conv.Value instead.
func UintValueMap
deprecated
UintValueMap converts a string map of uint pointers into a string map of uint values.
Deprecated: use conv.ValueMap instead.
func UintValueSlice
deprecated
UintValueSlice converts a slice of uint pointers into a slice of uint values.
Deprecated: use conv.ValueSlice instead.
func WriteJSON
deprecated
WriteJSON writes json data.
Deprecated: use jsonutils.WriteJSON instead.
func YAMLData
deprecated
YAMLData loads a yaml document from either http or a file.
Deprecated: use loading.YAMLData instead.
func YAMLDoc
deprecated
func YAMLDoc(path string) (json.RawMessage, error)
YAMLDoc loads a yaml document from either http or a file and converts it to json.
Deprecated: use loading.YAMLDoc instead.
func YAMLMatcher
deprecated
YAMLMatcher matches yaml for a file loader.
Deprecated: use loading.YAMLMatcher instead.
func YAMLToJSON
deprecated
func YAMLToJSON(data interface{}) (json.RawMessage, error)
YAMLToJSON converts YAML unmarshaled data into json compatible data
Deprecated: use yamlutils.YAMLToJSON instead.
Types ¶
type CommandLineOptionsGroup
deprecated
type CommandLineOptionsGroup = cmdutils.CommandLineOptionsGroup
CommandLineOptionsGroup represents a group of user-defined command line options.
Deprecated: use cmdutils.CommandLineOptionsGroup instead.
type File
deprecated
added in
v0.21.0
File represents an uploaded file.
Deprecated: use fileutils.File instead.
type JSONMapItem
deprecated
type JSONMapItem = jsonutils.JSONMapItem
JSONMapItem represents a JSON object, with the order of keys maintained
Deprecated: use jsonutils.JSONMapItem instead.
type JSONMapSlice
deprecated
type JSONMapSlice = jsonutils.JSONMapSlice
JSONMapSlice represents a JSON object, with the order of keys maintained
Deprecated: use jsonutils.JSONMapSlice instead, or yamlutils.YAMLMapSlice if you marshal YAML.
type NameProvider
deprecated
type NameProvider = jsonname.NameProvider
NameProvider represents an object capable of translating from go property names to json property names.
Deprecated: use jsonname.NameProvider instead.
func NewNameProvider
deprecated
func NewNameProvider() *NameProvider
NewNameProvider creates a new name provider
Deprecated: use jsonname.NewNameProvider instead.