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: almost 2 years 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 KB - Last synced: about 1 month ago - Pushed: 8 months ago

COSAE-FR/riprovision
Provision Unifi devices to specific management VLANsSize: 4.9 MB - Last synced: about 1 month ago - Pushed: 3 months ago

COSAE-FR/riproxy
Proxy utility fo RIPSize: 84 KB - Last synced: about 1 month ago - Pushed: 3 months ago

COSAE-FR/ripugw
Fake Unifi GatewaySize: 68.4 KB - Last synced: about 1 month ago - Pushed: over 2 years ago

COSAE-FR/riputils
Common utilities for RIP projectsSize: 105 KB - Last synced: about 1 month ago - Pushed: over 1 year ago

MTES-MCT/filharmonic-api 📦
API of Fil'HarmonicSize: 870 KB - Last synced: 6 days ago - Pushed: about 6 years 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 MB - Last synced: 7 days ago - Pushed: about 1 year ago

SocialGouv/oblik
An operator designed to watch VPA objects and apply resources recommendations to Deployments and StatefulSets based on configurable annotationsSize: 9.01 MB - Last synced: 7 days ago - Pushed: about 1 month 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 MB - Last synced: 1 day ago - Pushed: over 8 years ago


