Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
mdymalla committed Jul 16, 2024
1 parent 218edc3 commit 7a5b2e9
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions signer/core/apitypes/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,20 +216,22 @@ func (t *Type) isArray() bool {
// typeName returns the canonical name of the type. If the type is 'Person[]', then
// this method returns 'Person'
func (t *Type) typeName() string {
re := regexp.MustCompile(`\[\d*\]`)
// re := regexp.MustCompile(`\[\d*\]`)

// print input string
fmt.Println("\nInput string: ", t.Type)

if strings.Contains(t.Type, "[") {
replaced := re.ReplaceAllString(t.Type, "")
fmt.Println("\noutput string: ", replaced)
return replaced
} else {
fmt.Println("\nno changes required to output string")
}
return "test"

// if strings.Contains(t.Type, "[") {
// replaced := re.ReplaceAllString(t.Type, "")
// fmt.Println("\noutput string: ", replaced)
// return replaced
// } else {
// fmt.Println("\nno changes required to output string")
// }

return t.Type
// return t.Type
}

type Types map[string][]Type
Expand Down

0 comments on commit 7a5b2e9

Please sign in to comment.