From ae0d93434ee831ae427615ee7ef02f2d07232f11 Mon Sep 17 00:00:00 2001 From: jolheiser Date: Wed, 19 Jun 2024 20:36:56 -0500 Subject: [PATCH] chore: update nixfig Signed-off-by: jolheiser --- cfg.go | 3 +++ go.mod | 2 +- go.mod.sri | 2 +- go.sum | 6 ++++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cfg.go b/cfg.go index f71f673..53b30f5 100644 --- a/cfg.go +++ b/cfg.go @@ -68,6 +68,9 @@ func Marshal(e Encoding, v any) ([]byte, error) { case TOML: return toml.Marshal(v) case NIX: + if nixfig.Fmt != nil { + return nixfig.MarshalFormat(v) + } return nixfig.Marshal(v) case KDL: return kdl.Marshal(v) diff --git a/go.mod b/go.mod index a75721c..1be84f7 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/philandstuff/dhall-golang/v6 v6.0.2 github.com/sblinch/kdl-go v0.0.0-20240410000746-21754ba9ac55 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 ) diff --git a/go.mod.sri b/go.mod.sri index 44410ee..112a9d3 100644 --- a/go.mod.sri +++ b/go.mod.sri @@ -1 +1 @@ -sha256-IKdsBsOJ41qh/d2ZxgkY0IihIGieYlTtdHRmFufS+yQ= \ No newline at end of file +sha256-UbjwyV55TOyTXiYZCdTmwinZ0SGLRS95qYmvD4odnnM= \ No newline at end of file diff --git a/go.sum b/go.sum index 357afc9..906a790 100644 --- a/go.sum +++ b/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= 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-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/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=