Repository navigation
Answer what the second round of simulated users got stuck on - #10
Merged
Merged
Conversation
Warn that a struct encoding itself must not be embedded, since the outer struct then loses its other fields, and link the example in the repository, which pkg.go.dev shows only after a release. Move the silent replacement of a second WithMarshalers option into Usage, with code, and say what creating options costs. Say what decoding does not check, and the rules a schema needs: exponents, truncation, the range, the sign, zero counts with a fraction, the output form, what Units does not read, decoding into any, and the order of maps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From the second round: 20 Haiku agents, 8 repeating the hardest cases of the first round and 12 new ones.
outer struct encodes as the inner one alone. Checked:
{"name":"x", RetryPolicy}came out as{"initial_backoff":1}. The README now says to use a named field, and links the example in the repository insteadof pkg.go.dev, which shows it only after a release.
WithMarshalersnext toWithsilently drops one of them. This moves from "Good to know" into Usage, withjoined options as code (compiled and run).
below a nanosecond truncated, the largest value
PT2562047H47M16.854775807S, one-or+in front,"P0.0D"rejected,
"P0DT2H"written back as"PT2H", values not range-checked, decoding intoanygives strings, maps inrandom order unless
json.Deterministic(true).Unitsdoes not cover: humantime's"1h 30m", PostgreSQL's"01:30:00", and protobuf's"3600s"readbut written as
"1h0m0s".Withcosts about 13 allocations (measured withtesting.AllocsPerRun), so create options once.