File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -153,9 +153,9 @@ func (c *Config) GetCustomMapFieldMembers() []string {
153
153
return members
154
154
}
155
155
156
- // IsMarkerShape returns true if a given shape name is a marker shape ,
156
+ // HasShapeAsMarker returns true if the given shape is setup as marker_shape in config ,
157
157
// otherwise returns false
158
- func (c * Config ) IsMarkerShape (shapeName string ) bool {
158
+ func (c * Config ) HasShapeAsMarker (shapeName string ) bool {
159
159
for _ , markerShape := range c .MarkerShapes {
160
160
if markerShape == shapeName {
161
161
return true
Original file line number Diff line number Diff line change @@ -1388,7 +1388,7 @@ func varEmptyConstructorK8sType(
1388
1388
1389
1389
switch shape .Type {
1390
1390
case "structure" :
1391
- if r .Config ().IsMarkerShape (shape .ShapeName ) {
1391
+ if r .Config ().HasShapeAsMarker (shape .ShapeName ) {
1392
1392
// f0 := []byte{}
1393
1393
out += fmt .Sprintf ("%s%s := []byte{}\n " , indent , varName )
1394
1394
} else {
Original file line number Diff line number Diff line change @@ -396,8 +396,8 @@ func (m *Model) IsShapeUsedInCRDs(shapeName string) bool {
396
396
return false
397
397
}
398
398
399
- // IsMarkerShape return true if the supplied shape name is a marker shape
400
- func (m * Model ) IsMarkerShape (shapeName string ) bool {
399
+ // HasShapeAsMarker return true if the supplied shape name is a marker shape
400
+ func (m * Model ) HasShapeAsMarker (shapeName string ) bool {
401
401
return slices .Contains (m .cfg .MarkerShapes , shapeName )
402
402
}
403
403
@@ -478,7 +478,7 @@ func (m *Model) getShapeCleanGoType(shape *awssdkmodel.Shape) string {
478
478
return "*metav1.Time"
479
479
case "structure" :
480
480
if len (shape .MemberRefs ) == 0 {
481
- if m .cfg .IsMarkerShape (shape .ShapeName ) {
481
+ if m .cfg .HasShapeAsMarker (shape .ShapeName ) {
482
482
return "[]byte"
483
483
}
484
484
panic (fmt .Sprintf ("structure %s has no fields, either configure it as a `marker_shape` or manually set the field type" , shape .ShapeName ))
You can’t perform that action at this time.
0 commit comments