File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package utils
2+
3+ import (
4+ "io/fs"
5+ "os"
6+ )
7+
8+ var _ fs.ReadFileFS = OsFS {}
9+
10+ type OsFS struct {}
11+
12+ func (o OsFS ) Open (name string ) (fs.File , error ) {
13+ return os .Open (name )
14+ }
15+
16+ func (o OsFS ) ReadFile (name string ) ([]byte , error ) {
17+ return os .ReadFile (name )
18+ }
Original file line number Diff line number Diff line change 77 "github.com/stackitcloud/stackit-cli/internal/pkg/config"
88 "github.com/stackitcloud/stackit-cli/internal/pkg/print"
99 "github.com/stackitcloud/stackit-cli/internal/pkg/types"
10+ "github.com/stackitcloud/stackit-cli/internal/pkg/utils"
1011)
1112
1213// These values are overwritten by GoReleaser at build time
@@ -28,7 +29,7 @@ func main() {
2829 Printer : printer ,
2930 CliVersion : version ,
3031 Date : date ,
31- Fs : os . DirFS ( "/" ) ,
32+ Fs : utils. OsFS {} ,
3233 Args : os .Args [1 :],
3334 }
3435 if ! cmd .Execute (& params ) {
You can’t perform that action at this time.
0 commit comments