1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
Source: golang-github-creasty-defaults
Section: golang
Priority: optional
Maintainer: Debian Go Packaging Team <team+pkg-go@tracker.debian.org>
Uploaders: Daniel Milde <daniel@milde.cz>
Rules-Requires-Root: no
Build-Depends: debhelper-compat (= 13),
dh-sequence-golang,
golang-any
Testsuite: autopkgtest-pkg-go
Standards-Version: 4.6.2
Vcs-Browser: https://salsa.debian.org/go-team/packages/golang-github-creasty-defaults
Vcs-Git: https://salsa.debian.org/go-team/packages/golang-github-creasty-defaults.git
Homepage: https://github.com/creasty/defaults
XS-Go-Import-Path: github.com/creasty/defaults
Package: golang-github-creasty-defaults-dev
Architecture: all
Multi-Arch: foreign
Depends: ${misc:Depends}
Description: Initialize structs with default values (library)
Initialize structs with default values
.
* Supports almost all kind of types
* Scalar types
* int/8/16/32/64, uint/8/16/32/64, float32/64
* uintptr, bool, string
* Complex types
* map, slice, struct
* Nested types
* map[K1]map[K2]Struct, []map[K1]Struct[]
* Aliased types
* time.Duration
* e.g., type Enum string
* Pointer types
* e.g., *SampleStruct, *int
.
* Recursively initializes fields in a struct
* Dynamically sets default values by defaults.Setter (/setter.go)
interface
* Preserves non-initial values from being reset with a default value
|