mirror of
https://github.com/PrivateCaptcha/PrivateCaptcha.git
synced 2026-05-13 00:08:34 -05:00
Run go fmt
This commit is contained in:
@@ -17,11 +17,11 @@ func TestEnvConfigValueUpdate(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
key common.ConfigKey
|
||||
envValue string
|
||||
expectedValue string
|
||||
expectedError bool
|
||||
name string
|
||||
key common.ConfigKey
|
||||
envValue string
|
||||
expectedValue string
|
||||
expectedError bool
|
||||
}{
|
||||
{"valid_key_with_value", common.StageKey, "production", "production", false},
|
||||
{"valid_key_empty_value", common.StageKey, "", "", true},
|
||||
|
||||
@@ -259,9 +259,9 @@ func TestMemoryTimeSeriesRetrievePropertyStatsByPeriodAllPeriods(t *testing.T) {
|
||||
|
||||
// Add records at various times to test different period aggregations
|
||||
accessRecords := []*common.AccessRecord{
|
||||
{OrgID: 1, PropertyID: 1, Timestamp: now.Add(-30 * time.Minute)}, // Today
|
||||
{OrgID: 1, PropertyID: 1, Timestamp: now.Add(-2 * time.Hour)}, // Today
|
||||
{OrgID: 1, PropertyID: 1, Timestamp: now.Add(-3 * 24 * time.Hour)}, // This week
|
||||
{OrgID: 1, PropertyID: 1, Timestamp: now.Add(-30 * time.Minute)}, // Today
|
||||
{OrgID: 1, PropertyID: 1, Timestamp: now.Add(-2 * time.Hour)}, // Today
|
||||
{OrgID: 1, PropertyID: 1, Timestamp: now.Add(-3 * 24 * time.Hour)}, // This week
|
||||
{OrgID: 1, PropertyID: 1, Timestamp: now.Add(-15 * 24 * time.Hour)}, // This month
|
||||
}
|
||||
ts.WriteAccessLogBatch(ctx, accessRecords)
|
||||
|
||||
@@ -23,9 +23,9 @@ var (
|
||||
)
|
||||
|
||||
const (
|
||||
registerContentsTemplate = "login/register-contents.html"
|
||||
userNameErrorMessage = "Name contains invalid characters."
|
||||
emailAlreadyRegisteredError = "Such email is already registered. Login instead?"
|
||||
registerContentsTemplate = "login/register-contents.html"
|
||||
userNameErrorMessage = "Name contains invalid characters."
|
||||
emailAlreadyRegisteredError = "Such email is already registered. Login instead?"
|
||||
)
|
||||
|
||||
func (s *Server) getRegister(w http.ResponseWriter, r *http.Request) (*ViewModel, error) {
|
||||
|
||||
@@ -522,9 +522,9 @@ func TestDeleteAccount(t *testing.T) {
|
||||
}
|
||||
|
||||
type accountStatsSuiteResult struct {
|
||||
user *dbgen.User
|
||||
srv *http.ServeMux
|
||||
cookie *http.Cookie
|
||||
user *dbgen.User
|
||||
srv *http.ServeMux
|
||||
cookie *http.Cookie
|
||||
}
|
||||
|
||||
func accountStatsSuite(t *testing.T, ctx context.Context) *accountStatsSuiteResult {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package puzzle
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"encoding/base64"
|
||||
"encoding/binary"
|
||||
randv2 "math/rand/v2"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
Reference in New Issue
Block a user