Skip to content

Commit 52badd5

Browse files
chore: bump sage
1 parent 6af0e60 commit 52badd5

File tree

8 files changed

+20
-51
lines changed

8 files changed

+20
-51
lines changed

.sage/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module sage
22

33
go 1.17
44

5-
require go.einride.tech/sage v0.182.0
5+
require go.einride.tech/sage v0.213.2

.sage/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
go.einride.tech/sage v0.182.0 h1:yvTDktPO1DkTVgxtVkHBoqRM8RAFJVD4RqM8W74vHNc=
2-
go.einride.tech/sage v0.182.0/go.mod h1:EzV5uciFX7/2ho8EKB5K9JghOfXIxlzs694b+Tkl5GQ=
1+
go.einride.tech/sage v0.213.2 h1:weCzlDFFYmoOGlHxoyGvcPpij4EAYCkoxbPqMOZS11U=
2+
go.einride.tech/sage v0.213.2/go.mod h1:EzV5uciFX7/2ho8EKB5K9JghOfXIxlzs694b+Tkl5GQ=
File renamed without changes.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ sagefile := $(abspath $(cwd)/.sage/bin/sagefile)
1010
go := $(shell command -v go 2>/dev/null)
1111
export GOWORK ?= off
1212
ifndef go
13-
SAGE_GO_VERSION ?= 1.18.4
13+
SAGE_GO_VERSION ?= 1.20.2
1414
export GOROOT := $(abspath $(cwd)/.sage/tools/go/$(SAGE_GO_VERSION)/go)
1515
export PATH := $(PATH):$(GOROOT)/bin
1616
go := $(GOROOT)/bin/go

examples/proto/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ sagefile := $(abspath $(cwd)/../../.sage/bin/sagefile)
1010
go := $(shell command -v go 2>/dev/null)
1111
export GOWORK ?= off
1212
ifndef go
13-
SAGE_GO_VERSION ?= 1.18.4
13+
SAGE_GO_VERSION ?= 1.20.2
1414
export GOROOT := $(abspath $(cwd)/../../.sage/tools/go/$(SAGE_GO_VERSION)/go)
1515
export PATH := $(PATH):$(GOROOT)/bin
1616
go := $(GOROOT)/bin/go

examples/proto/einride/example/freight/v1/freight_service.proto

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,14 @@ service FreightService {
2929
// Get a shipper.
3030
// See: https://google.aip.dev/131 (Standard methods: Get).
3131
rpc GetShipper(GetShipperRequest) returns (Shipper) {
32-
option (google.api.http) = {
33-
get: "/v1/{name=shippers/*}"
34-
};
32+
option (google.api.http) = {get: "/v1/{name=shippers/*}"};
3533
option (google.api.method_signature) = "name";
3634
}
3735

3836
// List shippers.
3937
// See: https://google.aip.dev/132 (Standard methods: List).
4038
rpc ListShippers(ListShippersRequest) returns (ListShippersResponse) {
41-
option (google.api.http) = {
42-
get: "/v1/shippers"
43-
};
39+
option (google.api.http) = {get: "/v1/shippers"};
4440
}
4541

4642
// Create a shipper.
@@ -67,27 +63,21 @@ service FreightService {
6763
// See: https://google.aip.dev/135 (Standard methods: Delete).
6864
// See: https://google.aip.dev/164 (Soft delete).
6965
rpc DeleteShipper(DeleteShipperRequest) returns (Shipper) {
70-
option (google.api.http) = {
71-
delete: "/v1/{name=shippers/*}"
72-
};
66+
option (google.api.http) = {delete: "/v1/{name=shippers/*}"};
7367
option (google.api.method_signature) = "name";
7468
}
7569

7670
// Get a site.
7771
// See: https://google.aip.dev/131 (Standard methods: Get).
7872
rpc GetSite(GetSiteRequest) returns (Site) {
79-
option (google.api.http) = {
80-
get: "/v1/{name=shippers/*/sites/*}"
81-
};
73+
option (google.api.http) = {get: "/v1/{name=shippers/*/sites/*}"};
8274
option (google.api.method_signature) = "name";
8375
}
8476

8577
// List sites for a shipper.
8678
// See: https://google.aip.dev/132 (Standard methods: List).
8779
rpc ListSites(ListSitesRequest) returns (ListSitesResponse) {
88-
option (google.api.http) = {
89-
get: "/v1/{parent=shippers/*}/sites"
90-
};
80+
option (google.api.http) = {get: "/v1/{parent=shippers/*}/sites"};
9181
option (google.api.method_signature) = "parent";
9282
}
9383

@@ -115,27 +105,21 @@ service FreightService {
115105
// See: https://google.aip.dev/135 (Standard methods: Delete).
116106
// See: https://google.aip.dev/164 (Soft delete).
117107
rpc DeleteSite(DeleteSiteRequest) returns (Site) {
118-
option (google.api.http) = {
119-
delete: "/v1/{name=shippers/*/sites/*}"
120-
};
108+
option (google.api.http) = {delete: "/v1/{name=shippers/*/sites/*}"};
121109
option (google.api.method_signature) = "name";
122110
}
123111

124112
// Get a shipment.
125113
// See: https://google.aip.dev/131 (Standard methods: Get).
126114
rpc GetShipment(GetShipmentRequest) returns (Shipment) {
127-
option (google.api.http) = {
128-
get: "/v1/{name=shippers/*/shipments/*}"
129-
};
115+
option (google.api.http) = {get: "/v1/{name=shippers/*/shipments/*}"};
130116
option (google.api.method_signature) = "name";
131117
}
132118

133119
// List shipments for a shipper.
134120
// See: https://google.aip.dev/132 (Standard methods: List).
135121
rpc ListShipments(ListShipmentsRequest) returns (ListShipmentsResponse) {
136-
option (google.api.http) = {
137-
get: "/v1/{parent=shippers/*}/shipments"
138-
};
122+
option (google.api.http) = {get: "/v1/{parent=shippers/*}/shipments"};
139123
option (google.api.method_signature) = "parent";
140124
}
141125

@@ -163,9 +147,7 @@ service FreightService {
163147
// See: https://google.aip.dev/135 (Standard methods: Delete).
164148
// See: https://google.aip.dev/164 (Soft delete).
165149
rpc DeleteShipment(DeleteShipmentRequest) returns (Shipment) {
166-
option (google.api.http) = {
167-
delete: "/v1/{name=shippers/*/shipments/*}"
168-
};
150+
option (google.api.http) = {delete: "/v1/{name=shippers/*/shipments/*}"};
169151
option (google.api.method_signature) = "name";
170152
}
171153
}
@@ -283,9 +265,7 @@ message CreateSiteRequest {
283265
// Format: shippers/{shipper}
284266
string parent = 1 [
285267
(google.api.field_behavior) = REQUIRED,
286-
(google.api.resource_reference) = {
287-
child_type: "freight-example.einride.tech/Shipper"
288-
}
268+
(google.api.resource_reference) = {child_type: "freight-example.einride.tech/Shipper"}
289269
];
290270
// The site to create.
291271
Site site = 2 [(google.api.field_behavior) = REQUIRED];
@@ -363,9 +343,7 @@ message CreateShipmentRequest {
363343
// Format: shippers/{shipper}
364344
string parent = 1 [
365345
(google.api.field_behavior) = REQUIRED,
366-
(google.api.resource_reference) = {
367-
child_type: "freight-example.einride.tech/Shipper"
368-
}
346+
(google.api.resource_reference) = {child_type: "freight-example.einride.tech/Shipper"}
369347
];
370348
// The shipment to create.
371349
Shipment shipment = 2 [(google.api.field_behavior) = REQUIRED];

examples/proto/einride/example/syntax/v1/syntax_service.proto

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,11 @@ import "google/protobuf/empty.proto";
88

99
service SyntaxService {
1010
rpc QueryOnly(Request) returns (Message) {
11-
option (google.api.http) = {
12-
get: "/v1"
13-
};
11+
option (google.api.http) = {get: "/v1"};
1412
}
1513

1614
rpc EmptyVerb(google.protobuf.Empty) returns (google.protobuf.Empty) {
17-
option (google.api.http) = {
18-
get: "/v1:emptyVerb"
19-
};
15+
option (google.api.http) = {get: "/v1:emptyVerb"};
2016
}
2117

2218
rpc StarBody(Request) returns (Message) {
@@ -34,9 +30,7 @@ service SyntaxService {
3430
}
3531

3632
rpc Path(Request) returns (Message) {
37-
option (google.api.http) = {
38-
post: "/v1/{string}:path"
39-
};
33+
option (google.api.http) = {post: "/v1/{string}:path"};
4034
}
4135

4236
rpc PathBody(Request) returns (Message) {

internal/plugin/servicegen.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ func (s serviceGenerator) Generate(f *codegen.File) error {
2121
if s.genHandler {
2222
s.generateHandler(f)
2323
}
24-
if err := s.generateClient(f); err != nil {
25-
return err
26-
}
27-
return nil
24+
return s.generateClient(f)
2825
}
2926

3027
func (s serviceGenerator) generateInterface(f *codegen.File) {

0 commit comments

Comments
 (0)