{"id":27881839,"url":"https://github.com/src-d/go-parse-utils","last_synced_at":"2025-05-05T05:05:38.640Z","repository":{"id":57480022,"uuid":"79907944","full_name":"src-d/go-parse-utils","owner":"src-d","description":null,"archived":false,"fork":false,"pushed_at":"2018-11-28T02:48:57.000Z","size":18,"stargazers_count":15,"open_issues_count":2,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-05T05:05:33.589Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/src-d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-24T12:04:33.000Z","updated_at":"2025-04-30T01:46:10.000Z","dependencies_parsed_at":"2022-09-26T17:41:35.322Z","dependency_job_id":null,"html_url":"https://github.com/src-d/go-parse-utils","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/src-d%2Fgo-parse-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/src-d%2Fgo-parse-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/src-d%2Fgo-parse-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/src-d%2Fgo-parse-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/src-d","download_url":"https://codeload.github.com/src-d/go-parse-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252442486,"owners_count":21748451,"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":[],"created_at":"2025-05-05T05:05:38.198Z","updated_at":"2025-05-05T05:05:38.630Z","avatar_url":"https://github.com/src-d.png","language":"Go","readme":"# go-parse-utils\n\n`go-parse-utils` is a collection of utilities for parsing code easily.\n\n[![GoDoc](https://godoc.org/gopkg.in/src-d/go-parse-utils.v1?status.svg)](https://godoc.org/gopkg.in/src-d/go-parse-utils.v1) [![Build Status](https://travis-ci.org/src-d/go-parse-utils.svg?branch=master)](https://travis-ci.org/src-d/go-parse-utils) [![codecov](https://codecov.io/gh/src-d/go-parse-utils/branch/master/graph/badge.svg)](https://codecov.io/gh/src-d/go-parse-utils) [![License](http://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org) [![Go Report Card](https://goreportcard.com/badge/gopkg.in/src-d/go-parse-utils.v1)](https://goreportcard.com/report/gopkg.in/src-d/go-parse-utils.v1)\n\n### Install\n\n```\ngo get gopkg.in/src-d/go-parse-utils.v1\n```\n\n### Package AST\n\n`PackageAST` retrieves the `*ast.Package` of a package in the given path.\n\n```go\npkg, err := parseutil.PackageAST(\"github.com/my/project\")\n```\n\n### Source code importer\n\nThe default `importer.Importer` of the Go standard library scans compiled objects, which can be painful to deal with in code generation, as it requires to `go build` before running `go generate`.\n\nThis packages provides an implementation of `importer.Importer` and `importer.ImporterFrom` that reads directly from source code if the package is in the GOPATH, otherwise (the stdlib, for example) falls back to the default importer in the standard library.\n\nFeatures:\n* It is safe for concurrent use.\n* Caches packages after they are first imported.\n\n```go\nimporter := parseutil.NewImporter()\npkg, err := importer.Import(\"github.com/my/project\")\n```\n\n### License\n\nMIT, see [LICENSE](/LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrc-d%2Fgo-parse-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrc-d%2Fgo-parse-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrc-d%2Fgo-parse-utils/lists"}