replace gogofast with gogofaster extension

gogofaster is identical as gogofast but removes XXX_unrecognized

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2023-01-07 23:23:43 +01:00
parent 1eaea43581
commit 735537d6b1
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
9 changed files with 13 additions and 8 deletions

View file

@ -1,3 +1,3 @@
//go:generate protoc --gogofast_out=import_path=github.com/docker/docker/api/types/plugins/logdriver:. entry.proto //go:generate protoc --gogofaster_out=import_path=github.com/docker/docker/api/types/plugins/logdriver:. entry.proto
package logdriver // import "github.com/docker/docker/api/types/plugins/logdriver" package logdriver // import "github.com/docker/docker/api/types/plugins/logdriver"

View file

@ -1,3 +1,3 @@
//go:generate protoc --gogofast_out=import_path=github.com/docker/docker/api/types/swarm/runtime:. plugin.proto //go:generate protoc --gogofaster_out=import_path=github.com/docker/docker/api/types/swarm/runtime:. plugin.proto
package runtime // import "github.com/docker/docker/api/types/swarm/runtime" package runtime // import "github.com/docker/docker/api/types/swarm/runtime"

View file

@ -36,7 +36,7 @@ RUN --mount=from=src,source=/out,target=.,rw \
set -ex set -ex
./hack/with-go-mod.sh go install -v -mod=vendor -modfile=vendor.mod \ ./hack/with-go-mod.sh go install -v -mod=vendor -modfile=vendor.mod \
github.com/gogo/protobuf/protoc-gen-gogo \ github.com/gogo/protobuf/protoc-gen-gogo \
github.com/gogo/protobuf/protoc-gen-gogofast \ github.com/gogo/protobuf/protoc-gen-gogofaster \
github.com/gogo/protobuf/protoc-gen-gogoslick \ github.com/gogo/protobuf/protoc-gen-gogoslick \
github.com/golang/protobuf/protoc-gen-go github.com/golang/protobuf/protoc-gen-go
./hack/with-go-mod.sh go build -v -mod=vendor -modfile=vendor.mod \ ./hack/with-go-mod.sh go build -v -mod=vendor -modfile=vendor.mod \

View file

@ -9,7 +9,7 @@ package tools
import ( import (
_ "github.com/gogo/protobuf/protoc-gen-gogo" _ "github.com/gogo/protobuf/protoc-gen-gogo"
_ "github.com/gogo/protobuf/protoc-gen-gogofast" _ "github.com/gogo/protobuf/protoc-gen-gogofaster"
_ "github.com/gogo/protobuf/protoc-gen-gogoslick" _ "github.com/gogo/protobuf/protoc-gen-gogoslick"
_ "github.com/golang/protobuf/protoc-gen-go" _ "github.com/golang/protobuf/protoc-gen-go"
) )

View file

@ -1,6 +1,6 @@
package libnetwork package libnetwork
//go:generate protoc -I=. -I=../vendor/ --gogo_out=import_path=github.com/docker/docker/libnetwork:. agent.proto //go:generate protoc -I=. -I=../vendor/ --gogofaster_out=import_path=github.com/docker/docker/libnetwork:. agent.proto
import ( import (
"encoding/json" "encoding/json"

View file

@ -2,7 +2,7 @@
package overlay package overlay
//go:generate protoc -I=. -I=../../../vendor/ --gogo_out=import_path=github.com/docker/docker/libnetwork/drivers/overlay:. overlay.proto //go:generate protoc -I=. -I=../../../vendor/ --gogofaster_out=import_path=github.com/docker/docker/libnetwork/drivers/overlay:. overlay.proto
import ( import (
"fmt" "fmt"

View file

@ -1,6 +1,6 @@
package networkdb package networkdb
//go:generate protoc -I=. -I=../../vendor/ --gogo_out=import_path=github.com/docker/docker/libnetwork/networkdb:. networkdb.proto //go:generate protoc -I=. -I=../../vendor/ --gogofaster_out=import_path=github.com/docker/docker/libnetwork/networkdb:. networkdb.proto
import ( import (
"context" "context"

View file

@ -42,6 +42,11 @@ func main() {
vanity.ForEachFile(files, vanity.TurnOnSizerAll) vanity.ForEachFile(files, vanity.TurnOnSizerAll)
vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll)
vanity.ForEachFieldInFilesExcludingExtensions(vanity.OnlyProto2(files), vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly)
vanity.ForEachFile(files, vanity.TurnOffGoUnrecognizedAll)
vanity.ForEachFile(files, vanity.TurnOffGoUnkeyedAll)
vanity.ForEachFile(files, vanity.TurnOffGoSizecacheAll)
resp := command.Generate(req) resp := command.Generate(req)
command.Write(resp) command.Write(resp)
} }

2
vendor/modules.txt vendored
View file

@ -469,7 +469,7 @@ github.com/gogo/protobuf/protoc-gen-gogo/generator
github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap
github.com/gogo/protobuf/protoc-gen-gogo/grpc github.com/gogo/protobuf/protoc-gen-gogo/grpc
github.com/gogo/protobuf/protoc-gen-gogo/plugin github.com/gogo/protobuf/protoc-gen-gogo/plugin
github.com/gogo/protobuf/protoc-gen-gogofast github.com/gogo/protobuf/protoc-gen-gogofaster
github.com/gogo/protobuf/protoc-gen-gogoslick github.com/gogo/protobuf/protoc-gen-gogoslick
github.com/gogo/protobuf/sortkeys github.com/gogo/protobuf/sortkeys
github.com/gogo/protobuf/types github.com/gogo/protobuf/types