Skip to content

Commit 1992243

Browse files
committed
feat: comments updated for StringPointerFrom
1 parent a5f65b6 commit 1992243

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/strings/strings.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,8 @@ func CutSuffix(s, suffix string) (before string, found bool) {
12961296
}
12971297

12981298
// StringPointerFrom returns a string pointer for the given string constant.
1299-
// This is specifically useful when we are writing test cases such as passing a string pointer to a struct field.
1299+
// This is specifically useful when we are writing test cases,
1300+
// such as passing a string pointer to a struct field from a string constant.
13001301
func StringPointerFrom(s string) *string {
13011302
newString := Join([]string{s}, "")
13021303
return &newString

0 commit comments

Comments
 (0)