Skip to content

Commit

Permalink
Add utility function
Browse files Browse the repository at this point in the history
  • Loading branch information
royroyee committed Feb 3, 2024
1 parent 0b93b5f commit 83ec640
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,13 @@ func SaveFile(fileName string, data []byte) error {

return nil
}

func BoolPointerToString(value *bool) string {
if value == nil {
return "null"
}
if *value {
return "true"
}
return "false"
}

0 comments on commit 83ec640

Please sign in to comment.