From 353a4efc344d7fd7dcb2b12ea675a5f00eae30d1 Mon Sep 17 00:00:00 2001 From: Owen Ou Date: Fri, 14 Jun 2024 21:02:54 -0700 Subject: [PATCH] Improve --- Makefile | 1 + cmd/migrate/main.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6b10ef59..0bde2bd0 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ GOBIN ?= $(CURDIR)/build build: yarn go build -o $(GOBIN)/jqplay ./cmd/jqplay + go build -o $(GOBIN)/jqplay-next-migrate ./cmd/migrate .PHONY: test test: diff --git a/cmd/migrate/main.go b/cmd/migrate/main.go index 83008596..4f9375e1 100644 --- a/cmd/migrate/main.go +++ b/cmd/migrate/main.go @@ -23,6 +23,7 @@ var optionsMap = map[string]string{ "compact-output": "-c", "raw-output": "-r", "raw-input": "-R", + "sort-keys": "-S", } type OldSnippet struct { @@ -104,7 +105,7 @@ func main() { new, ) if err != nil { - log.Fatal(err) + log.Printf("error upserting snippet: %s %v", old.Slug, err) } }