loveuer f8372b8de8
All checks were successful
/ build ushare (push) Successful in 45s
/ clean (push) Successful in 0s
feat:
1. local msg/file share by webrtc
fix:
  1. meta clean goroutine walk error
  2. clean interval to args(--clean)
2025-06-23 23:08:29 +08:00

27 lines
427 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
CleanInterval int
}
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)
}
}