Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit eb40da2

Browse files
committed
proto: fake-gen fix go deprecations
Fix some package deprecations in proto/hack/fake-gen Signed-off-by: Blaine Gardner <[email protected]>
1 parent ef233d6 commit eb40da2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: proto/hack/fake-gen/main.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ package main
99

1010
import (
1111
"fmt"
12-
"io/ioutil"
12+
"io"
1313
"os"
1414
"strings"
1515

1616
. "github.com/dave/jennifer/jen"
17-
"github.com/golang/protobuf/proto"
1817
plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
18+
"google.golang.org/protobuf/proto"
1919
)
2020

2121
type GoFake struct {
@@ -25,13 +25,13 @@ type GoFake struct {
2525
}
2626

2727
type FakeService struct {
28-
Name string
28+
Name string
2929
Methods []Method
3030
}
3131

3232
type Method struct {
33-
Name string
34-
Input string
33+
Name string
34+
Input string
3535
Output string
3636
}
3737

@@ -50,7 +50,7 @@ func (runner *GoFake) getLocationMessage() map[string][]*FakeService {
5050
for _, svc := range svcs {
5151
_, _ = fmt.Fprintf(os.Stderr, "service: %+v\n", svc)
5252
current := &FakeService{
53-
Name: fmt.Sprintf("%sClient", *svc.Name),
53+
Name: fmt.Sprintf("%sClient", *svc.Name),
5454
}
5555
methods := make([]Method, 0)
5656
for _, mtd := range svc.Method {
@@ -145,7 +145,7 @@ func main() {
145145
req := &plugin.CodeGeneratorRequest{}
146146
resp := &plugin.CodeGeneratorResponse{}
147147

148-
data, err := ioutil.ReadAll(os.Stdin)
148+
data, err := io.ReadAll(os.Stdin)
149149
if err != nil {
150150
panic(err)
151151
}

0 commit comments

Comments
 (0)