Chromium Code Reviews

Side by Side Diff: server/static/rpcexplorer/test/gen.go

Issue 2219023003: Update APIs to use new Google cloud paths. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 package main 1 package main
2 2
3 // This file generates descriptor.html. Run itself: 3 // This file generates descriptor.html. Run itself:
4 //go:generate go run gen.go 4 //go:generate go run gen.go
5 5
6 import ( 6 import (
7 "fmt" 7 "fmt"
8 "io/ioutil" 8 "io/ioutil"
9 "os" 9 "os"
10 "os/exec" 10 "os/exec"
11 11
12 "github.com/golang/protobuf/jsonpb" 12 "github.com/golang/protobuf/jsonpb"
13 "github.com/golang/protobuf/proto" 13 "github.com/golang/protobuf/proto"
14 » "github.com/luci/luci-go/common/proto/google/descriptor" 14 » "google.golang.org/genproto/protobuf"
15 ) 15 )
16 16
17 func run() error { 17 func run() error {
18 descFile, err := ioutil.TempFile("", "desc") 18 descFile, err := ioutil.TempFile("", "desc")
19 if err != nil { 19 if err != nil {
20 return err 20 return err
21 } 21 }
22 22
23 protoc := exec.Command( 23 protoc := exec.Command(
24 "protoc", 24 "protoc",
(...skipping 46 matching lines...)
71 _, err = fmt.Fprintln(out, ";\n</script>") 71 _, err = fmt.Fprintln(out, ";\n</script>")
72 return err 72 return err
73 } 73 }
74 74
75 func main() { 75 func main() {
76 if err := run(); err != nil { 76 if err := run(); err != nil {
77 fmt.Fprintln(os.Stderr, err) 77 fmt.Fprintln(os.Stderr, err)
78 os.Exit(1) 78 os.Exit(1)
79 } 79 }
80 } 80 }
OLDNEW

Powered by Google App Engine