Skip to content

Commit

Permalink
Rename code variable and type
Browse files Browse the repository at this point in the history
  • Loading branch information
eddy-aws committed Dec 14, 2022
1 parent 87493d8 commit 85ca501
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions private/model/api/codegentest/service/awsquerycompatible/api.go

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

8 changes: 4 additions & 4 deletions private/model/api/shape.go
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ type {{ $.ShapeName }} struct {
{{- $_ := $.API.AddSDKImport "private/protocol" }}
RespMetadata protocol.ResponseMetadata` + "`json:\"-\" xml:\"-\"`" + `
{{- if $.API.Metadata.AWSQueryCompatible }}
code string
Code_ *string
{{- end }}
{{- end }}
Expand Down Expand Up @@ -929,16 +929,16 @@ func newError{{ $.ShapeName }}(v protocol.ResponseMetadata) error {
func newQueryCompatibleError{{ $.ShapeName }}(v protocol.ResponseMetadata, code string) error {
return &{{ $.ShapeName }}{
RespMetadata: v,
code: code,
Code_: &code,
}
}
{{- end }}
// Code returns the exception type name.
func (s *{{ $.ShapeName }}) Code() string {
{{- if $.API.Metadata.AWSQueryCompatible }}
if s.code != "" {
return s.code
if s.Code_ != nil {
return *s.Code_
}
{{- end }}
return "{{ $.ErrorName }}"
Expand Down

0 comments on commit 85ca501

Please sign in to comment.