Unify type names between Type.String() and the type() method
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 72/100
Research direction
Start with the type names in node.go (the String() method for TypeMap, TypeNilValue and TypeBoolValue) and the TypeQuery.Exec method in method.go, both linked in the issue. Pick the JSON-style names the issue proposes and make Exec return n.Type().String(). Done when type() output and schema error messages use the same spellings and the existing tests are updated to match.
Written by the indexing model from the issue text.
Description
Problem
The same types are spelled differently depending on where they surface:
| Type | Type.String() |
type() query method |
|---|---|---|
| TypeMap | map |
object |
| TypeNilValue | nil |
null |
| TypeBoolValue | bool |
boolean |
Schema error messages use the former, tq output uses the latter.
https://github.com/mojatter/tree/blob/2d4fd3d11f3e28c7c95f51d091b94ef0a6ed18f1/node.go#L62-L79
https://github.com/mojatter/tree/blob/2d4fd3d11f3e28c7c95f51d091b94ef0a6ed18f1/method.go#L181-L198
Proposed fix
Pick one vocabulary (JSON terms object / null / boolean match the data model and jq) and have TypeQuery.Exec return n.Type().String(). Update schema messages and tests accordingly.
- Dominant language
- Go
- Stars
- 7
- Forks
- 2
- Avg merge
- 10h 20m
- Merged PRs (30d)
- 50
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mojatter/tree
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
Similar issues
-
VLAgent `spec.k8sCollector.includePodLabels: false` has no effectPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
VictoriaMetrics/operator#2772 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Gaurav-Gosain/tuios#1316 ·
Maintainers usually reply within 1 day
-
area:auth documentation priority:low
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Mend: dependency security vulnerability
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
kube-tarian/sigrun#203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
kubernetes-csi/csi-driver-iscsi#485 ·
Maintainers usually reply within 1 day