{"id":26924042,"url":"https://github.com/goiste/goparser","last_synced_at":"2025-07-07T00:03:58.021Z","repository":{"id":56855157,"uuid":"525433795","full_name":"goiste/goparser","owner":"goiste","description":"Parse Go files by annotation in doc comment","archived":false,"fork":false,"pushed_at":"2022-08-16T15:32:13.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-25T09:06:31.227Z","etag":null,"topics":["ast","ast-tree","go","go-parser","golang","parser"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goiste.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-16T15:15:02.000Z","updated_at":"2022-08-16T17:10:42.000Z","dependencies_parsed_at":"2022-09-22T14:25:29.912Z","dependency_job_id":null,"html_url":"https://github.com/goiste/goparser","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/goiste/goparser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goiste%2Fgoparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goiste%2Fgoparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goiste%2Fgoparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goiste%2Fgoparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goiste","download_url":"https://codeload.github.com/goiste/goparser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goiste%2Fgoparser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263991427,"owners_count":23540662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","ast-tree","go","go-parser","golang","parser"],"created_at":"2025-04-02T01:53:04.514Z","updated_at":"2025-07-07T00:03:57.995Z","avatar_url":"https://github.com/goiste.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Parser\n\nA small package that helps you parse Go files by annotation in doc comment, e.g. get var values or list of struct\nmethods.\n\n\u003cbr\u003e\n\nFeatures:\n\n- get values of variables:\n    - literal types\n    - slices of literal types\n    - maps with literal types as keys and values\n- get list of function names:\n    - by method receiver type\n    - by parameters types\n\n\u003cbr\u003e\n\nLiteral types:\n\n- bool\n- string\n- int8-int64\n- uint8-uint64\n- float32/64\n\n  — set directly, w/o type castings or pointers\n\n\u003cbr\u003e\n\nUsage:\n\nparsed code:\n\n```go\nvar (\n// parser\nboolValue = true\n\n// parser:str\nstringValue = \"3\"\n```\n\n[full example_code.go](example/example_code.go)\n\nmain code:\n\n```go\nimport (\n\tgp \"github.com/goiste/goparser\"\n)\n\n...\n\np, err := gp.New(\"example_code.go\")\nif err != nil {\npanic(err)\n}\n\nboolValues := gp.GetBasicValues[bool](p, \"parser\")\nfor _, v := range boolValues {\nfmt.Printf(\"name: %s; value: %t\\n\", v.Name, v.Value) // name: boolValue; value: true\n}\n\nstringValues := gp.GetBasicValues[string](p, \"parser\", \"parser:str\")\nfor _, v := range stringValues {\nfmt.Printf(\"name: %s; value: %q\\n\", v.Name, v.Value) // name: stringValue; value: \"3\"\n}\n```\n\n[full example.go](example/example.go)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoiste%2Fgoparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoiste%2Fgoparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoiste%2Fgoparser/lists"}