Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(internal): fix spelling errors #1567

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/gengapic/custom_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (g *generator) customOperationType() error {

// Wait
p("// Wait blocks until the operation is complete, polling regularly")
p("// after an intial period of backing off between attempts.")
p("// after an initial period of backing off between attempts.")
p("func (o *%s) Wait(ctx context.Context, opts ...gax.CallOption) error {", opName)
p(" bo := gax.Backoff{")
p(" Initial: %s,", defaultPollInitialDelay)
Expand Down
2 changes: 1 addition & 1 deletion internal/gengapic/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func (g *generator) exampleLROCall(m *descriptorpb.MethodDescriptorProto) {
opInfo := eLRO.(*longrunning.OperationInfo)
if opInfo.GetResponseType() == emptyValue || opInfo == nil {
// no new variables when this is used
// therefore don't attempt to delcare it
// therefore don't attempt to declare it
retVars = "err ="
}

Expand Down
2 changes: 1 addition & 1 deletion internal/gengapic/gengrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (g *generator) genGRPCMethods(serv *descriptorpb.ServiceDescriptorProto, se
}

// genGRPCMethod generates a single method from a client. m must be a method declared in serv.
// If the generated method requires an auxillary type, it is added to aux.
// If the generated method requires an auxiliary type, it is added to aux.
func (g *generator) genGRPCMethod(servName string, serv *descriptorpb.ServiceDescriptorProto, m *descriptorpb.MethodDescriptorProto) error {
// Check if the RPC returns google.longrunning.Operation.
if g.isLRO(m) {
Expand Down
2 changes: 1 addition & 1 deletion internal/gengapic/testdata/custom_op_type_bool.want
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func (o *Operation) Name() string {
}

// Wait blocks until the operation is complete, polling regularly
// after an intial period of backing off between attempts.
// after an initial period of backing off between attempts.
func (o *Operation) Wait(ctx context.Context, opts ...gax.CallOption) error {
bo := gax.Backoff{
Initial: time.Second,
Expand Down
2 changes: 1 addition & 1 deletion internal/gengapic/testdata/custom_op_type_enum.want
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func (o *Operation) Name() string {
}

// Wait blocks until the operation is complete, polling regularly
// after an intial period of backing off between attempts.
// after an initial period of backing off between attempts.
func (o *Operation) Wait(ctx context.Context, opts ...gax.CallOption) error {
bo := gax.Backoff{
Initial: time.Second,
Expand Down
8 changes: 4 additions & 4 deletions internal/grpc_service_config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func New(in io.Reader) (Config, error) {

// RetryPolicy returns the retryPolicy and a presence flag for the
// given fully-qualified Service and simple Method names. A config assignment
// for a specific Method takes precendence over a Service-level assignment.
// for a specific Method takes precedence over a Service-level assignment.
func (c Config) RetryPolicy(s, m string) (*MethodConfig_RetryPolicy, bool) {
// Favor the policy defined for a fully-qualified Method name.
policy, ok := c.policies[s+"."+m]
Expand All @@ -102,7 +102,7 @@ func (c Config) RetryPolicy(s, m string) (*MethodConfig_RetryPolicy, bool) {

// Timeout returns the timeout in milliseconds and a presence flag for the given
// fully-qualified Service and simple Method names. A config assignment for the
// specific Method takes precendence over a Service-level assignment.
// specific Method takes precedence over a Service-level assignment.
func (c Config) Timeout(s, m string) (int64, bool) {
// Favor the timeout defined for a fully-qualified Method name.
timeout, ok := c.timeouts[s+"."+m]
Expand All @@ -128,7 +128,7 @@ func ToMillis(d *duration.Duration) int64 {

// RequestLimit returns the request limit in bytes and a presence flag for the
// given fully-qualified Service and simple Method names. A config assignment
// for a specific Method takes precendence over a Service-level assignment.
// for a specific Method takes precedence over a Service-level assignment.
func (c Config) RequestLimit(s, m string) (int, bool) {
// Favor the limit defined for a fully-qualified Method name.
lim, ok := c.reqLimits[s+"."+m]
Expand All @@ -143,7 +143,7 @@ func (c Config) RequestLimit(s, m string) (int, bool) {

// ResponseLimit returns the response limit in bytes and a presence flag for the
// given fully-qualified Service and simple Method names. A config assignment
// for a specific Method takes precendence over a Service-level assignment.
// for a specific Method takes precedence over a Service-level assignment.
func (c Config) ResponseLimit(s, m string) (int, bool) {
// Favor the limit defined for a fully-qualified Method name.
lim, ok := c.resLimits[s+"."+m]
Expand Down
4 changes: 2 additions & 2 deletions internal/grpc_service_config/grpc_service_config.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions internal/grpc_service_config/grpc_service_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ message MethodConfig {
// compression) in bytes. This applies both to streaming and non-streaming
// requests.
//
// The actual value used is the minumum of the value specified here and the
// The actual value used is the minimum of the value specified here and the
// value set by the application via the gRPC client API. If either one is
// not set, then the other will be used. If neither is set, then the
// built-in default is used.
Expand All @@ -92,7 +92,7 @@ message MethodConfig {
// compression) in bytes. This applies both to streaming and non-streaming
// requests.
//
// The actual value used is the minumum of the value specified here and the
// The actual value used is the minimum of the value specified here and the
// value set by the application via the gRPC client API. If either one is
// not set, then the other will be used. If neither is set, then the
// built-in default is used.
Expand Down Expand Up @@ -303,4 +303,4 @@ message ServiceConfig {
HealthCheckConfig health_check_config = 5;

// next available tag: 6
}
}
Loading