@@ -18,6 +18,8 @@ import (
18
18
"time"
19
19
20
20
"golang.org/x/sync/errgroup"
21
+ "golang.org/x/text/cases"
22
+ "golang.org/x/text/language"
21
23
"golang.org/x/tools/go/packages"
22
24
)
23
25
@@ -27,15 +29,15 @@ func goAppleBind(gobind string, pkgs []*packages.Package, targets []targetInfo)
27
29
28
30
if buildO == "" {
29
31
name = pkgs [0 ].Name
30
- title = strings .Title (name )
32
+ title = cases .Title ( language . English ). String (name )
31
33
buildO = title + ".xcframework"
32
34
} else {
33
35
if ! strings .HasSuffix (buildO , ".xcframework" ) {
34
36
return fmt .Errorf ("static framework name %q missing .xcframework suffix" , buildO )
35
37
}
36
38
base := filepath .Base (buildO )
37
39
name = base [:len (base )- len (".xcframework" )]
38
- title = strings .Title (name )
40
+ title = cases .Title ( language . English ). String (name )
39
41
}
40
42
41
43
if err := removeAll (buildO ); err != nil {
@@ -185,7 +187,7 @@ func goAppleBind(gobind string, pkgs []*packages.Package, targets []targetInfo)
185
187
186
188
fileBases := make ([]string , len (pkgs )+ 1 )
187
189
for i , pkg := range pkgs {
188
- fileBases [i ] = bindPrefix + strings .Title (pkg .Name )
190
+ fileBases [i ] = bindPrefix + cases .Title ( language . English ). String (pkg .Name )
189
191
}
190
192
fileBases [len (fileBases )- 1 ] = "Universe"
191
193
0 commit comments