| OLD | NEW | 
|---|
| 1 // Copyright 2016 The LUCI Authors. All rights reserved. | 1 // Copyright 2016 The LUCI Authors. All rights reserved. | 
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 | 
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. | 
| 4 | 4 | 
| 5 package main | 5 package main | 
| 6 | 6 | 
| 7 // This file generates descriptor.html. Run itself: | 7 // This file generates descriptor.html. Run itself: | 
| 8 //go:generate go run gen.go | 8 //go:generate go run gen.go | 
| 9 | 9 | 
| 10 import ( | 10 import ( | 
| 11         "fmt" | 11         "fmt" | 
| 12         "io/ioutil" | 12         "io/ioutil" | 
| 13         "os" | 13         "os" | 
| 14         "os/exec" | 14         "os/exec" | 
| 15 | 15 | 
| 16         "github.com/golang/protobuf/jsonpb" | 16         "github.com/golang/protobuf/jsonpb" | 
| 17         "github.com/golang/protobuf/proto" | 17         "github.com/golang/protobuf/proto" | 
| 18 »       "github.com/luci/luci-go/common/proto/google/descriptor" | 18 »       "google.golang.org/genproto/protobuf" | 
| 19 ) | 19 ) | 
| 20 | 20 | 
| 21 func run() error { | 21 func run() error { | 
| 22         descFile, err := ioutil.TempFile("", "desc") | 22         descFile, err := ioutil.TempFile("", "desc") | 
| 23         if err != nil { | 23         if err != nil { | 
| 24                 return err | 24                 return err | 
| 25         } | 25         } | 
| 26 | 26 | 
| 27         protoc := exec.Command( | 27         protoc := exec.Command( | 
| 28                 "protoc", | 28                 "protoc", | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 75         _, err = fmt.Fprintln(out, ";\n</script>") | 75         _, err = fmt.Fprintln(out, ";\n</script>") | 
| 76         return err | 76         return err | 
| 77 } | 77 } | 
| 78 | 78 | 
| 79 func main() { | 79 func main() { | 
| 80         if err := run(); err != nil { | 80         if err := run(); err != nil { | 
| 81                 fmt.Fprintln(os.Stderr, err) | 81                 fmt.Fprintln(os.Stderr, err) | 
| 82                 os.Exit(1) | 82                 os.Exit(1) | 
| 83         } | 83         } | 
| 84 } | 84 } | 
| OLD | NEW | 
|---|