okay idk why i did that, revert the names

This commit is contained in:
2026-11-22 16:30:43 -05:00
parent d62dacfae5
commit 80a5ae1f69
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -40,12 +40,12 @@ func main() {
log.Fatal(err) log.Fatal(err)
} }
tracker := uploads.New() tracker := uploads.NewAccessTracker()
ctx, cancel := context.WithCancel(context.Background()) ctx, cancel := context.WithCancel(context.Background())
defer cancel() defer cancel()
go tracker.Run(ctx, db) go tracker.Run(ctx, db)
challengeStore := reports.New(3 * time.Minute) challengeStore := reports.NewChallengeStore(3 * time.Minute)
log.Println("listening on", config.Addr) log.Println("listening on", config.Addr)
router := server.NewRouter(db, config, pages, tracker, challengeStore) router := server.NewRouter(db, config, pages, tracker, challengeStore)
+1 -1
View File
@@ -28,7 +28,7 @@ type ChallengeStore struct {
const MaxChallenges = 10000 const MaxChallenges = 10000
func New(ttl time.Duration) *ChallengeStore { func NewChallengeStore(ttl time.Duration) *ChallengeStore {
if ttl <= 0 || ttl > 10*time.Minute { if ttl <= 0 || ttl > 10*time.Minute {
panic("invalid challenge ttl") panic("invalid challenge ttl")
} }
+1 -1
View File
@@ -15,7 +15,7 @@ type AccessTracker struct {
pending map[string]int64 pending map[string]int64
} }
func New() *AccessTracker { func NewAccessTracker() *AccessTracker {
return &AccessTracker{ return &AccessTracker{
pending: make(map[string]int64), pending: make(map[string]int64),
} }