Commit e77ddb1

mo khan <mo@mokhan.ca>
2025-05-06 20:13:26
refactor: extract variable for delimiter
1 parent a3d5689
Changed files (1)
pkg
pkg/cookie/option.go
@@ -21,8 +21,8 @@ func WithValue(value string) x.Option[*http.Cookie] {
 
 func WithSignedValue(value string, signer crypt.Signer) x.Option[*http.Cookie] {
 	signature, _ := signer.Sign([]byte(value))
-	expected := fmt.Sprintf("%v--%v", value, string(signature))
-	return WithValue(expected)
+	delimiter := "--"
+	return WithValue(fmt.Sprintf("%v%v%v", value, delimiter, string(signature)))
 }
 
 func WithPath(value string) x.Option[*http.Cookie] {