init: 0.0.6
next: upload
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
package opt
|
||||
|
||||
type config struct {
|
||||
Debug bool
|
||||
Address string
|
||||
Debug bool
|
||||
Address string
|
||||
DataPath string
|
||||
}
|
||||
|
||||
var (
|
||||
|
15
internal/opt/var.go
Normal file
15
internal/opt/var.go
Normal file
@ -0,0 +1,15 @@
|
||||
package opt
|
||||
|
||||
import "path/filepath"
|
||||
|
||||
const (
|
||||
Meta = ".meta."
|
||||
)
|
||||
|
||||
func FilePath(code string) string {
|
||||
return filepath.Join(Cfg.DataPath, code)
|
||||
}
|
||||
|
||||
func MetaPath(code string) string {
|
||||
return filepath.Join(Cfg.DataPath, Meta+code)
|
||||
}
|
Reference in New Issue
Block a user