vendor: Update github.com/gogo/protobuf
Also tweaks the proto definitions: - [packed=false] on the block_indexes field to retain compat with v0.14.16 and earlier. - Uses the vendored protobuf package in include paths. And, "build.go setup" will install the vendored protoc-gen-gogofast. This should ensure that a proto rebuild isn't so dependent on whatever version of the compiler and package the developer has installed... GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3864
This commit is contained in:
committed by
Audrius Butkevicius
parent
4fb9c143ac
commit
987718baf8
25
vendor/github.com/gogo/protobuf/gogoreplace/main.go
generated
vendored
Normal file
25
vendor/github.com/gogo/protobuf/gogoreplace/main.go
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
args := os.Args
|
||||
if len(args) != 4 {
|
||||
fmt.Println("gogoreplace wants three arguments")
|
||||
fmt.Println(" gogoreplace oldsubstring newsubstring filename")
|
||||
os.Exit(1)
|
||||
}
|
||||
data, err := ioutil.ReadFile(args[3])
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
data = bytes.Replace(data, []byte(args[1]), []byte(args[2]), -1)
|
||||
if err := ioutil.WriteFile(args[3], data, 0666); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user