diff --git a/mediatranslation/apiv1beta1/doc.go b/mediatranslation/apiv1beta1/doc.go index 24bb22908bcd..cd0a9f663002 100644 --- a/mediatranslation/apiv1beta1/doc.go +++ b/mediatranslation/apiv1beta1/doc.go @@ -96,8 +96,6 @@ package mediatranslation // import "cloud.google.com/go/mediatranslation/apiv1be import ( "context" - "fmt" - "net/http" "os" "runtime" "strconv" @@ -186,22 +184,3 @@ func versionGo() string { } return "UNKNOWN" } - -// maybeUnknownEnum wraps the given proto-JSON parsing error if it is the result -// of receiving an unknown enum value. -func maybeUnknownEnum(err error) error { - if strings.Contains(err.Error(), "invalid value for enum type") { - err = fmt.Errorf("received an unknown enum value; a later version of the library may support it: %w", err) - } - return err -} - -// buildHeaders extracts metadata from the outgoing context, joins it with any other -// given metadata, and converts them into a http.Header. -func buildHeaders(ctx context.Context, mds ...metadata.MD) http.Header { - if cmd, ok := metadata.FromOutgoingContext(ctx); ok { - mds = append(mds, cmd) - } - md := metadata.Join(mds...) - return http.Header(md) -}