chore: move the go code into a subfolder

This commit is contained in:
Florian Forster
2025-08-05 15:20:32 -07:00
parent 4ad22ba456
commit cd2921de26
2978 changed files with 373 additions and 300 deletions

View File

@@ -0,0 +1,42 @@
package domain
import (
"testing"
"github.com/muhlemmer/gu"
"github.com/stretchr/testify/assert"
)
func TestUserAgent_GetFingerprintID(t *testing.T) {
tests := []struct {
name string
fields *UserAgent
want string
}{
{
name: "nil useragent",
fields: nil,
want: "",
},
{
name: "nil fingerprintID",
fields: &UserAgent{
FingerprintID: nil,
},
want: "",
},
{
name: "value",
fields: &UserAgent{
FingerprintID: gu.Ptr("fp"),
},
want: "fp",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := tt.fields.GetFingerprintID()
assert.Equal(t, tt.want, got)
})
}
}