Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Unify type names between Type.String() and the type() method

Open
#111 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
72/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
go
Domain
backend

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

enhancement good first issue

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mojatter/tree

All issues in mojatter/tree

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.