Registry / utility / anchore-go-struct-converter

anchore-go-struct-converter

JSON →
library0.1.0gogounverified

Package go-struct-converter provides utilities for converting between Go struct types.

go get github.com/anchore/go-struct-converter
INSTALL
IMPORT
SIG · ANCHORE-GO-STRUCT-
A
anchore-go-struct-converter
utilitygov0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

converter
github.com/anchore/go-struct-converter

Converts a Source struct to a Dest struct using the converter.

package main import ( "fmt" "github.com/anchore/go-struct-converter" ) type Source struct { Name string } type Dest struct { Name string } func main() { src := Source{Name: "test"} var dst Dest err := converter.Convert(src, &dst) if err != nil { panic(err) } fmt.Println(dst.Name) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.1.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
16
OpenAI (training)
1
Resources
anchore-go-struct-converter — go get anchore-go-struct-converter · libregistry