summaryrefslogtreecommitdiff
path: root/internal/types
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-05-25 23:17:38 +0300
committerPaul Buetow <paul@buetow.org>2024-05-25 23:17:38 +0300
commit6e631b4ccbe71299137469a69900b874d709fe35 (patch)
tree727962808911d945ab903725d450d5101b8135da /internal/types
parentbee82ce126846acd815cdc51f39f5c344ca432d2 (diff)
refactor vfs into its own package
Diffstat (limited to 'internal/types')
-rw-r--r--internal/types/entry.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/types/entry.go b/internal/types/entry.go
index 55391de..b4a05e4 100644
--- a/internal/types/entry.go
+++ b/internal/types/entry.go
@@ -7,7 +7,7 @@ import (
"strings"
"sync"
- "codeberg.org/snonux/gos/internal"
+ "codeberg.org/snonux/gos/internal/vfs"
)
// Tells me whether the entry was shared to the sm platform named Name
@@ -37,7 +37,7 @@ type Entry struct {
Body string `json:"body"`
Shared []Shared `json:"shared,omitempty"`
Epoch int `json:"epoch,omitempty"`
- vfs internal.VFS
+ vfs vfs.VFS
// The checksum of the whole entry, can change depending on the state.
checksum string
@@ -57,11 +57,11 @@ func NewEntry(bytes []byte) (Entry, error) {
return e, nil
}
-func NewEntryFromFile(filePath string, vfsToUse ...internal.VFS) (Entry, error) {
+func NewEntryFromFile(filePath string, vfsToUse ...vfs.VFS) (Entry, error) {
var (
bytes []byte
err error
- vfs internal.VFS = internal.RealFS{}
+ vfs vfs.VFS = vfs.RealFS{}
)
if len(vfsToUse) > 0 {
@@ -84,7 +84,7 @@ func NewEntryFromCopy(other Entry) (Entry, error) {
func (e *Entry) initialize() {
e.mu = &sync.Mutex{}
e.checksumDirty = true
- e.vfs = internal.RealFS{}
+ e.vfs = vfs.RealFS{}
}
func (e Entry) Equals(other Entry) bool {