Package Usage: go: github.com/stretchr/objx
Package objx provides utilities for dealing with maps, slices, JSON and other data.
Objx provides the `objx.Map` type, which is a `map[string]interface{}` that exposes
a powerful `Get` method (among others) that allows you to easily and quickly get
access to data within the map, without having to worry too much about type assertions,
missing data, default values etc.
Objx uses a predictable pattern to make access data from within `map[string]interface{}` easy.
Call one of the `objx.` functions to create your `objx.Map` to get going:
NOTE: Any methods or functions with the `Must` prefix will panic if something goes wrong,
the rest will be optimistic and try to figure things out without panicking.
Use `Get` to access the value you're interested in. You can use dot and array
notation too:
Once you have sought the `Value` you're interested in, you can use the `Is*` methods to determine its type.
Or you can just assume the type, and use one of the strong type methods to extract the real value:
If there's no value there (or if it's the wrong type) then a default value will be returned,
or you can be explicit about the default value.
If you're dealing with a slice of data as a value, Objx provides many useful methods for iterating,
manipulating and selecting that data. You can find out more by exploring the index below.
A simple example of how to use Objx:
Since `objx.Map` is a `map[string]interface{}` you can treat it as such.
For example, to `range` the data, do what you would expect:
8 versions
Latest release: presque 3 ans ago
20 211 dependent packages
View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/stretchr/objx
Dependent Repos 85
COSAE-FR/ripradius
Radius authentication cacheSize: 111 ko - Last synced: environ un an ago - Pushed: plus d'un an ago
COSAE-FR/riprovision
Provision Unifi devices to specific management VLANsSize: 4,9 Mo - Last synced: environ un an ago - Pushed: plus d'un an ago
COSAE-FR/riproxy
Proxy utility fo RIPSize: 84 ko - Last synced: environ un an ago - Pushed: plus d'un an ago
COSAE-FR/ripugw
Fake Unifi GatewaySize: 68,4 ko - Last synced: environ un an ago - Pushed: plus de 3 ans ago
COSAE-FR/riputils
Common utilities for RIP projectsSize: 105 ko - Last synced: environ un an ago - Pushed: plus de 2 ans ago
MTES-MCT/filharmonic-api 📦
API of Fil'HarmonicSize: 870 ko - Last synced: 2 jours ago - Pushed: environ 7 ans ago
SocialGouv/secretgen-controller Fork of carvel-dev/secretgen-controller
secretgen-controller provides CRDs to specify what secrets need to be on Kubernetes cluster (to be generated or not)Size: 30,4 Mo - Last synced: 2 jours ago - Pushed: environ 2 ans ago
SocialGouv/oblik
An operator designed to watch VPA objects and apply resources recommendations to Deployments and StatefulSets based on configurable annotationsSize: 9,04 Mo - Last synced: 2 jours ago - Pushed: 11 mois ago
Spirals-Team/genpack-swarm Fork of docker-archive/classicswarm
GenPack is an extension of Docker Swarm to better pack containers onto hostsSize: 12,8 Mo - Last synced: 9 jours ago - Pushed: plus de 9 ans ago