oprimized, working
This commit is contained in:
parent
2b39afca3b
commit
0350ecba9a
38 changed files with 1809 additions and 826 deletions
src/config
|
@ -20,6 +20,10 @@ var defaultConfig = Config{
|
|||
Fuse: Fuse{
|
||||
Enabled: false,
|
||||
},
|
||||
NFS: NFS{
|
||||
Enabled: false,
|
||||
Port: 8122,
|
||||
},
|
||||
},
|
||||
|
||||
TorrentClient: TorrentClient{
|
||||
|
|
|
@ -42,7 +42,10 @@ func Load(path string) (*Config, error) {
|
|||
}
|
||||
|
||||
conf := Config{}
|
||||
k.Unmarshal("", &conf)
|
||||
err = k.Unmarshal("", &conf)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &conf, nil
|
||||
}
|
||||
|
|
|
@ -61,6 +61,12 @@ type Mounts struct {
|
|||
WebDAV WebDAV `koanf:"webdav"`
|
||||
HttpFs HttpFs `koanf:"httpfs"`
|
||||
Fuse Fuse `koanf:"fuse"`
|
||||
NFS NFS `koanf:"nfs"`
|
||||
}
|
||||
|
||||
type NFS struct {
|
||||
Enabled bool `koanf:"enabled"`
|
||||
Port int `koanf:"port"`
|
||||
}
|
||||
|
||||
type HttpFs struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue