Skip to content

Commit 75af051

Browse files
committed
comment, remove unused function
1 parent e58c17b commit 75af051

File tree

2 files changed

+1
-22
lines changed

2 files changed

+1
-22
lines changed

packages/orchestrator/internal/cfg/model.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ type BuilderConfig struct {
3131
NetworkConfig network.Config
3232
}
3333

34+
// makePathsAbsolute avoids some complexities with symlinks and relative paths
3435
func makePathsAbsolute(c *BuilderConfig) error {
3536
for _, item := range []*string{
3637
&c.DefaultCachePath,
Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
package utils
22

33
import (
4-
"fmt"
54
"os"
6-
"path/filepath"
75
)
86

97
func SymlinkForce(oldname, newname string) error {
@@ -12,23 +10,3 @@ func SymlinkForce(oldname, newname string) error {
1210

1311
return os.Symlink(oldname, newname)
1412
}
15-
16-
func AbsSymlink(oldname, newname string) error {
17-
var err error
18-
19-
if !filepath.IsAbs(oldname) {
20-
oldname, err = filepath.Abs(oldname)
21-
if err != nil {
22-
return fmt.Errorf("failed to get absolute path of old path: %w", err)
23-
}
24-
}
25-
26-
if !filepath.IsAbs(newname) {
27-
newname, err = filepath.Abs(newname)
28-
if err != nil {
29-
return fmt.Errorf("failed to get absolute path of new path: %w", err)
30-
}
31-
}
32-
33-
return os.Symlink(oldname, newname)
34-
}

0 commit comments

Comments
 (0)