Skip to content

Commit

Permalink
[CWS] do not generate getter for length functions (#33584)
Browse files Browse the repository at this point in the history
  • Loading branch information
safchain authored Jan 30, 2025
1 parent ebb2e67 commit 5f4441f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 518 deletions.
1 change: 1 addition & 0 deletions pkg/security/generators/accessors/accessors.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ func handleNonEmbedded(module *common.Module, field seclField, prefixedFieldName

func addLengthOpField(module *common.Module, alias string, field *common.StructField) *common.StructField {
lengthField := *field
lengthField.GenGetters = false
lengthField.IsLength = true
lengthField.Name += ".length"
lengthField.OrigType = "int"
Expand Down
Loading

0 comments on commit 5f4441f

Please sign in to comment.