Remove enumvalue_customname, goproto_enum_prefix and enum_customname

This commit removes gogoproto.enumvalue_customname,
gogoproto.goproto_enum_prefix and gogoproto.enum_customname.

All of them make proto-generated Go code more idiomatic, but we already
don't use these enums in our external-surfacing types and they are anyway
not supported by Google's official toolchain (see #6564).

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
Kazuyoshi Kato
2022-03-21 19:07:10 +00:00
parent 977cb8bef0
commit 067611fdea
22 changed files with 269 additions and 361 deletions

View File

@@ -192,10 +192,10 @@ func (p *proxySnapshotter) Cleanup(ctx context.Context) error {
}
func toKind(kind snapshotsapi.Kind) snapshots.Kind {
if kind == snapshotsapi.KindActive {
if kind == snapshotsapi.Kind_ACTIVE {
return snapshots.KindActive
}
if kind == snapshotsapi.KindView {
if kind == snapshotsapi.Kind_VIEW {
return snapshots.KindView
}
return snapshots.KindCommitted
@@ -233,12 +233,12 @@ func toMounts(mm []*types.Mount) []mount.Mount {
func fromKind(kind snapshots.Kind) snapshotsapi.Kind {
if kind == snapshots.KindActive {
return snapshotsapi.KindActive
return snapshotsapi.Kind_ACTIVE
}
if kind == snapshots.KindView {
return snapshotsapi.KindView
return snapshotsapi.Kind_VIEW
}
return snapshotsapi.KindCommitted
return snapshotsapi.Kind_COMMITTED
}
func fromInfo(info snapshots.Info) snapshotsapi.Info {