88 "google.golang.org/api/sheets/v4"
99)
1010
11+ const sheetsUserEnteredFormatPrefix = "userEnteredFormat"
12+
1113func normalizeFormatMask (mask string ) (string , []string ) {
1214 parts := splitFieldMask (mask )
1315 if len (parts ) == 0 {
@@ -22,17 +24,17 @@ func normalizeFormatMask(mask string) (string, []string) {
2224 }
2325
2426 switch {
25- case part == "userEnteredFormat" :
27+ case part == sheetsUserEnteredFormatPrefix :
2628 normalized = append (normalized , part )
27- case strings .HasPrefix (part , "userEnteredFormat ." ):
28- formatPath := strings .TrimPrefix (part , "userEnteredFormat ." )
29+ case strings .HasPrefix (part , sheetsUserEnteredFormatPrefix + " ." ):
30+ formatPath := strings .TrimPrefix (part , sheetsUserEnteredFormatPrefix + " ." )
2931 normalized = append (normalized , part )
3032 if formatPath != "" {
3133 formatJSONPaths = append (formatJSONPaths , formatPath )
3234 }
3335 default :
3436 if isFormatJSONPath (part ) {
35- normalized = append (normalized , "userEnteredFormat ."+ part )
37+ normalized = append (normalized , sheetsUserEnteredFormatPrefix + " ."+ part )
3638 formatJSONPaths = append (formatJSONPaths , part )
3739 } else {
3840 normalized = append (normalized , part )
0 commit comments