Use the new scalarliterals option for repr

This commit is contained in:
Elara 2023-08-22 21:08:50 -07:00
parent 54209e2191
commit a810595186
3 changed files with 4 additions and 4 deletions

View File

@ -58,7 +58,7 @@ func main() {
}
if *printGo {
repr.Println(fc)
repr.New(os.Stdout, repr.ScalarLiterals()).Println(fc)
} else {
enc := json.NewEncoder(os.Stdout)
if *pretty {

2
go.mod
View File

@ -4,7 +4,7 @@ go 1.21.0
require (
github.com/alecthomas/participle/v2 v2.0.0
github.com/alecthomas/repr v0.2.0
github.com/alecthomas/repr v0.2.1-0.20230822000955-cded7b9e5c50
github.com/go-test/deep v1.1.0
github.com/spf13/pflag v1.0.5
go.elara.ws/logger v0.0.0-20230421022458-e80700db2090

4
go.sum
View File

@ -2,8 +2,8 @@ github.com/alecthomas/assert/v2 v2.2.2 h1:Z/iVC0xZfWTaFNE6bA3z07T86hd45Xe2eLt6WV
github.com/alecthomas/assert/v2 v2.2.2/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ=
github.com/alecthomas/participle/v2 v2.0.0 h1:Fgrq+MbuSsJwIkw3fEj9h75vDP0Er5JzepJ0/HNHv0g=
github.com/alecthomas/participle/v2 v2.0.0/go.mod h1:rAKZdJldHu8084ojcWevWAL8KmEU+AT+Olodb+WoN2Y=
github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk=
github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/alecthomas/repr v0.2.1-0.20230822000955-cded7b9e5c50 h1:LYrljCGKIk9IpO5wrbUqzM59sCmK9MIZ7VDK8tidRGs=
github.com/alecthomas/repr v0.2.1-0.20230822000955-cded7b9e5c50/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg=