Skip to content

Commit

Permalink
feat: update sage
Browse files Browse the repository at this point in the history
  • Loading branch information
Jusabe Guedes authored and dojusa committed Jul 19, 2023
1 parent 819157e commit 8195175
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .sage/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module sage

go 1.17

require go.einride.tech/sage v0.161.0
require go.einride.tech/sage v0.229.0
4 changes: 2 additions & 2 deletions .sage/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
go.einride.tech/sage v0.161.0 h1:TwWlU6djdEtL9dVOSsG9mXbI110I4+REIpZ5CH1/7dY=
go.einride.tech/sage v0.161.0/go.mod h1:EzV5uciFX7/2ho8EKB5K9JghOfXIxlzs694b+Tkl5GQ=
go.einride.tech/sage v0.229.0 h1:YMSySmoxZGD1woZTImzH3B543X5wJmAjOTK6elA7iCc=
go.einride.tech/sage v0.229.0/go.mod h1:EzV5uciFX7/2ho8EKB5K9JghOfXIxlzs694b+Tkl5GQ=
2 changes: 1 addition & 1 deletion .sage/sagefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func All(ctx context.Context) error {

func FormatYAML(ctx context.Context) error {
sg.Logger(ctx).Println("formatting YAML files...")
return sgyamlfmt.Command(ctx, "-d", sg.FromGitRoot(), "-r").Run()
return sgyamlfmt.Run(ctx)
}

func GoModTidy(ctx context.Context) error {
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Code generated by go.einride.tech/sage. DO NOT EDIT.
# To learn more, see .sage/sagefile.go and https://github.com/einride/sage.
# To learn more, see .sage/main.go and https://github.com/einride/sage.

.DEFAULT_GOAL := all

Expand All @@ -10,7 +10,7 @@ sagefile := $(abspath $(cwd)/.sage/bin/sagefile)
go := $(shell command -v go 2>/dev/null)
export GOWORK ?= off
ifndef go
SAGE_GO_VERSION ?= 1.18.4
SAGE_GO_VERSION ?= 1.20.2
export GOROOT := $(abspath $(cwd)/.sage/tools/go/$(SAGE_GO_VERSION)/go)
export PATH := $(PATH):$(GOROOT)/bin
go := $(GOROOT)/bin/go
Expand Down
7 changes: 4 additions & 3 deletions encoding/protobq/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
"flag"
"fmt"
"log"
"strconv"

"cloud.google.com/go/bigquery"
Expand Down Expand Up @@ -109,7 +110,7 @@ func ExampleMarshal() {
}
row, err := protobq.Marshal(msg)
if err != nil {
// TODO: Handle error.
log.Fatal(err)
}
expected := map[string]bigquery.Value{
"name": "publishers/123/books/456",
Expand All @@ -130,7 +131,7 @@ func ExampleUnmarshal() {
}
msg := &library.Book{}
if err := protobq.Unmarshal(row, msg); err != nil {
// TODO: Handle error.
log.Fatal(err)
}
expected := &library.Book{
Name: "publishers/123/books/456",
Expand All @@ -157,7 +158,7 @@ func ExampleLoad() {
}
msg := &library.Book{}
if err := protobq.Load(row, schema, msg); err != nil {
// TODO: Handle error.
log.Fatal(err)
}
expected := &library.Book{
Name: "publishers/123/books/456",
Expand Down
4 changes: 2 additions & 2 deletions encoding/protobq/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ func TestUnmarshalOptions_Load(t *testing.T) {
Id: 1192980459,
Body: &structpb.Struct{
Fields: map[string]*structpb.Value{
"lat": &structpb.Value{
"lat": {
Kind: &structpb.Value_NumberValue{
NumberValue: 76.16119999999999,
},
},
"lon": &structpb.Value{
"lon": {
Kind: &structpb.Value_NumberValue{
NumberValue: 14.03075,
},
Expand Down
4 changes: 2 additions & 2 deletions internal/examples/proto/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Code generated by go.einride.tech/sage. DO NOT EDIT.
# To learn more, see ../../../.sage/sagefile.go and https://github.com/einride/sage.
# To learn more, see ../../../.sage/main.go and https://github.com/einride/sage.

.DEFAULT_GOAL := all

Expand All @@ -10,7 +10,7 @@ sagefile := $(abspath $(cwd)/../../../.sage/bin/sagefile)
go := $(shell command -v go 2>/dev/null)
export GOWORK ?= off
ifndef go
SAGE_GO_VERSION ?= 1.18.4
SAGE_GO_VERSION ?= 1.20.2
export GOROOT := $(abspath $(cwd)/../../../.sage/tools/go/$(SAGE_GO_VERSION)/go)
export PATH := $(PATH):$(GOROOT)/bin
go := $(GOROOT)/bin/go
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ message DogecoinTransaction {
string type = 8; // STRING NULLABLE
repeated string addresses = 9; // STRING REPEATED

// TOOD: Figure out if there's a common protobuf type for NUMERIC.
//string value = 10; // NUMERIC NULLABLE
// TOOD: Figure out if there's a common protobuf type for NUMERIC.
//string value = 10; // NUMERIC NULLABLE
}

message Output {
Expand All @@ -54,7 +54,7 @@ message DogecoinTransaction {
string type = 5; // STRING NULLABLE
repeated string addresses = 6; // STRING REPEATED

// TOOD: Figure out if there's a common protobuf type for NUMERIC.
//string value = 7; // NUMERIC NULLABLE
// TOOD: Figure out if there's a common protobuf type for NUMERIC.
//string value = 7; // NUMERIC NULLABLE
}
}

0 comments on commit 8195175

Please sign in to comment.