Skip to content

Commit 262d0d9

Browse files
committed
Replaced Split with new Cut.
1 parent a1681eb commit 262d0d9

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

.goreleaser.yml

+19-19
Original file line numberDiff line numberDiff line change
@@ -9,61 +9,61 @@ before:
99
- go mod tidy
1010
builds:
1111
- id: FreeBSD
12-
goos: ['freebsd']
13-
goarch: ['amd64']
12+
goos: ["freebsd"]
13+
goarch: ["amd64"]
1414
- id: Linux_Intel
15-
goos: ['linux']
16-
goarch: ['amd64']
15+
goos: ["linux"]
16+
goarch: ["amd64"]
1717
- id: macOS
18-
goos: ['darwin']
19-
goarch: ['amd64', 'arm64']
18+
goos: ["darwin"]
19+
goarch: ["amd64", "arm64"]
2020
- id: Windows
21-
goos: ['windows']
22-
goarch: ['amd64']
21+
goos: ["windows"]
22+
goarch: ["amd64"]
2323
universal_binaries:
2424
- id: macOS
2525
name_template: "{{ .ProjectName }}"
2626
replace: true
2727
archives:
2828
- id: FreeBSD
29-
builds: ['FreeBSD']
29+
builds: ["FreeBSD"]
3030
format: tar.gz
3131
files:
32-
- none*
32+
- none*
3333
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
3434
replacements:
3535
amd64: Intel
3636
freebsd: FreeBSD
3737
- id: Linux_Intel
38-
builds: ['Linux_Intel']
38+
builds: ["Linux_Intel"]
3939
format: tar.gz
4040
files:
41-
- none*
41+
- none*
4242
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
4343
replacements:
44-
amd64: Intel
4544
linux: Linux
4645
- id: macOS
47-
builds: ['macOS']
46+
builds: ["macOS"]
4847
format: tar.gz
4948
files:
50-
- none*
49+
- none*
5150
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
5251
replacements:
5352
darwin: macOS
53+
amd64: Intel
5454
- id: Windows
55-
builds: ['Windows']
55+
builds: ["Windows"]
5656
format: zip
5757
files:
58-
- none*
58+
- none*
5959
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
6060
replacements:
6161
amd64: Intel
6262
windows: Windows
6363

6464
nfpms:
6565
- id: Linux
66-
builds: ['Linux_Intel']
66+
builds: ["Linux_Intel"]
6767
file_name_template: "{{ .ProjectName }}"
6868
replacements:
6969
amd64: Intel
@@ -104,4 +104,4 @@ scoop:
104104

105105
changelog:
106106
skip: false
107-
use: git
107+
use: git

pkg/zipcmt.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ func (c *Config) Clean() error {
228228
return nil
229229
}
230230
name = filepath.Clean(name)
231-
p := strings.Split(name, string(filepath.Separator))
232-
if p[0] == "~" {
231+
before, _, _ := strings.Cut(name, string(filepath.Separator))
232+
if before == "~" {
233233
hd, err := os.UserHomeDir()
234234
if err != nil {
235235
return fmt.Errorf("%s: export %w", name, err)

0 commit comments

Comments
 (0)