-
Notifications
You must be signed in to change notification settings - Fork 26
feat: Add JSON schema for configtype.Duration
#1303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2ea2141 to
8b6ef58
Compare
⏱️ Benchmark results
|
configtype.Durationconfigtype.Duration
| Spec: `false`, | ||
| }, | ||
| }, | ||
| func() []testCase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this syntax of appending a function that calls itself and appends the results in-line feels unnecessarily complicated, it'd be more readable to introduce a variable first and append that, like:
generatedCases := make([]testcase, 20)
for i := 0; i < 20; i++ {
generatedCases[i] = generateTestCase()
}
...
cases := append([]testCase{
{
Name: "empty",
Err: true,
Spec: `""`,
},
...,
generatedCases...
})
or have a few manually created test cases, there doesn't seem to be enough complexity here to warrant generating random cases
🤖 I have created a release *beep* *boop* --- ## [4.15.0](v4.14.1...v4.15.0) (2023-10-17) ### Features * Add JSON schema for `configtype.Duration` ([#1303](#1303)) ([5e1598b](5e1598b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
No description provided.