mirror of https://git.jolheiser.com/cfg.git
parent
8568a3b3ad
commit
ae0d93434e
3
cfg.go
3
cfg.go
|
@ -68,6 +68,9 @@ func Marshal(e Encoding, v any) ([]byte, error) {
|
||||||
case TOML:
|
case TOML:
|
||||||
return toml.Marshal(v)
|
return toml.Marshal(v)
|
||||||
case NIX:
|
case NIX:
|
||||||
|
if nixfig.Fmt != nil {
|
||||||
|
return nixfig.MarshalFormat(v)
|
||||||
|
}
|
||||||
return nixfig.Marshal(v)
|
return nixfig.Marshal(v)
|
||||||
case KDL:
|
case KDL:
|
||||||
return kdl.Marshal(v)
|
return kdl.Marshal(v)
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -8,7 +8,7 @@ require (
|
||||||
github.com/philandstuff/dhall-golang/v6 v6.0.2
|
github.com/philandstuff/dhall-golang/v6 v6.0.2
|
||||||
github.com/sblinch/kdl-go v0.0.0-20240410000746-21754ba9ac55
|
github.com/sblinch/kdl-go v0.0.0-20240410000746-21754ba9ac55
|
||||||
github.com/tailscale/hujson v0.0.0-20221223112325-20486734a56a
|
github.com/tailscale/hujson v0.0.0-20221223112325-20486734a56a
|
||||||
go.jolheiser.com/nixfig v0.0.0-20231129190849-8b2170b2ecda
|
go.jolheiser.com/nixfig v0.0.0-20240620014425-c1d5ec9d077a
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
sha256-IKdsBsOJ41qh/d2ZxgkY0IihIGieYlTtdHRmFufS+yQ=
|
sha256-UbjwyV55TOyTXiYZCdTmwinZ0SGLRS95qYmvD4odnnM=
|
6
go.sum
6
go.sum
|
@ -60,6 +60,12 @@ github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
|
||||||
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
|
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
|
||||||
go.jolheiser.com/nixfig v0.0.0-20231129190849-8b2170b2ecda h1:TdrB7ewFKHdv61ziR0Fzhj6zalgyjXdjBZIJJcdTohc=
|
go.jolheiser.com/nixfig v0.0.0-20231129190849-8b2170b2ecda h1:TdrB7ewFKHdv61ziR0Fzhj6zalgyjXdjBZIJJcdTohc=
|
||||||
go.jolheiser.com/nixfig v0.0.0-20231129190849-8b2170b2ecda/go.mod h1:GlnM735CZXZdJ7v9CMZ8Xjw1gZTrDXJ66Ak+jNwlwNU=
|
go.jolheiser.com/nixfig v0.0.0-20231129190849-8b2170b2ecda/go.mod h1:GlnM735CZXZdJ7v9CMZ8Xjw1gZTrDXJ66Ak+jNwlwNU=
|
||||||
|
go.jolheiser.com/nixfig v0.0.0-20240620013146-d3931c448175 h1:PDwpdixizHZQbU6DrXQCtMmnuTCPFivBUw7th2Fs+2k=
|
||||||
|
go.jolheiser.com/nixfig v0.0.0-20240620013146-d3931c448175/go.mod h1:ua/+4W7HyAsknnkU2gT2jzuURFx0cImj7Uht27606TY=
|
||||||
|
go.jolheiser.com/nixfig v0.0.0-20240620014138-f34fba6b99d6 h1:TB+c0tNI8bLvn+AddMV8Vy2r0zGRmZEkC4yhICrC7ts=
|
||||||
|
go.jolheiser.com/nixfig v0.0.0-20240620014138-f34fba6b99d6/go.mod h1:ua/+4W7HyAsknnkU2gT2jzuURFx0cImj7Uht27606TY=
|
||||||
|
go.jolheiser.com/nixfig v0.0.0-20240620014425-c1d5ec9d077a h1:KMiVqwvnDM3wpW7LmFb0W64HM2X7JZRXusGRrwGsYak=
|
||||||
|
go.jolheiser.com/nixfig v0.0.0-20240620014425-c1d5ec9d077a/go.mod h1:ua/+4W7HyAsknnkU2gT2jzuURFx0cImj7Uht27606TY=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
|
||||||
|
|
Loading…
Reference in New Issue