Fix maxAgeSeconds type handling in cookie pattern factory
The inline int type assertion silently dropped int64 and float64 values already supported by Attrs.getInt. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -1369,9 +1369,7 @@ func CreateCookiePattern(c *testutil.Client, categoryID string, attrs ...Attrs)
|
||||
"description": a.getString("description", "Test cookie pattern"),
|
||||
}
|
||||
if _, ok := a["maxAgeSeconds"]; ok {
|
||||
if v, ok := a["maxAgeSeconds"].(int); ok {
|
||||
input["maxAgeSeconds"] = v
|
||||
}
|
||||
input["maxAgeSeconds"] = a.getInt("maxAgeSeconds", 0)
|
||||
}
|
||||
|
||||
var result struct {
|
||||
|
||||
Reference in New Issue
Block a user