Skip to content

Commit

Permalink
moving hashsnap main.go to aptly named folder
Browse files Browse the repository at this point in the history
  • Loading branch information
dav-m85 committed Sep 16, 2022
1 parent 574d5ad commit fb89405
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 301 deletions.
File renamed without changes.
15 changes: 14 additions & 1 deletion fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,17 @@ import (
"os"
)

var FS fs.FS = os.DirFS(".")
type OS struct{}

func (OS) Open(name string) (fs.File, error) {
return os.Open(name)
}
func (OS) Stat(name string) (os.FileInfo, error) {
return os.Stat(name)
}
func (OS) ReadDir(name string) ([]os.DirEntry, error) {
return os.ReadDir(name)
}

// FS Vritual filesystem, can be chrooted kindof with os.DirFS(".")
var FS fs.FS = OS{}
9 changes: 3 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ module github.com/dav-m85/hashsnap
go 1.15

require (
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/integrii/flaggy v1.4.4
github.com/matryer/is v1.4.0 // indirect
github.com/google/go-cmp v0.5.9
github.com/google/uuid v1.3.0
github.com/matryer/is v1.4.0
github.com/schollz/progressbar/v3 v3.7.3
github.com/spf13/cobra v1.1.1
github.com/spf13/viper v1.7.1 // indirect
)
Loading

0 comments on commit fb89405

Please sign in to comment.