Skip to content

Commit

Permalink
preferring os.PathSeparato
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Grunde authored and Peter Grunde committed Apr 7, 2021
1 parent 7112ab4 commit c2c892c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
5 changes: 0 additions & 5 deletions app/cmd/path.go

This file was deleted.

4 changes: 2 additions & 2 deletions app/cmd/preview.go
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ func compressDirectory(source, target string, configYamlPaths []string) error {

fileIsIncluded := false
for _, p := range configYamlPaths {
var configPathSplits = strings.Split(p, PathSeparator)
var configPathSplits = strings.Split(p, string(os.PathSeparator))
var fileName = configPathSplits[len(configPathSplits)-1]
if strings.Contains(path, fileName) {
fileIsIncluded = true
Expand Down Expand Up @@ -764,7 +764,7 @@ func compressDirectory(source, target string, configYamlPaths []string) error {
// Check if the file we are iterating is a directory and update the header.Name
// or the header.Method appropriately
if info.IsDir() {
header.Name += PathSeparator
header.Name += string(os.PathSeparator)
} else {
header.Method = zip.Deflate
}
Expand Down
5 changes: 0 additions & 5 deletions app/cmd/windows.go

This file was deleted.

0 comments on commit c2c892c

Please sign in to comment.