loveuer 090253a752
All checks were successful
/ build ushare (push) Successful in 4s
/ clean (push) Successful in 0s
feat: 0.1.2
1. login page && auth required
  2. file dir cleanup
2025-05-12 09:35:53 +08:00

26 lines
388 B
Go

package opt
import (
"context"
"github.com/loveuer/nf/nft/log"
"github.com/loveuer/ushare/internal/pkg/tool"
)
type config struct {
Debug bool
Address string
DataPath string
Auth string
}
var (
Cfg = &config{}
)
func Init(_ context.Context) {
if Cfg.Auth != "" {
Cfg.Auth = tool.NewPassword(Cfg.Auth)
log.Debug("opt.Init: encrypted password = %s", Cfg.Auth)
}
}