{"id":31770030,"url":"https://github.com/jfrog/gomod-absolutizer","last_synced_at":"2025-10-10T02:56:31.241Z","repository":{"id":137594596,"uuid":"463242482","full_name":"jfrog/gomod-absolutizer","owner":"jfrog","description":"A Go library, used to search and replace relative paths in go.mod files to absolute paths.","archived":false,"fork":false,"pushed_at":"2024-07-09T13:23:29.000Z","size":33,"stargazers_count":4,"open_issues_count":0,"forks_count":5,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-07-10T10:37:42.433Z","etag":null,"topics":["absolute-paths","devops","go","golang","gomod","jfrog"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jfrog.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-24T17:36:05.000Z","updated_at":"2024-07-09T13:23:32.000Z","dependencies_parsed_at":"2023-07-04T00:01:01.957Z","dependency_job_id":"d1704aba-7243-4614-9a55-493c08323741","html_url":"https://github.com/jfrog/gomod-absolutizer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jfrog/gomod-absolutizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrog%2Fgomod-absolutizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrog%2Fgomod-absolutizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrog%2Fgomod-absolutizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrog%2Fgomod-absolutizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jfrog","download_url":"https://codeload.github.com/jfrog/gomod-absolutizer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrog%2Fgomod-absolutizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002512,"owners_count":26083403,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["absolute-paths","devops","go","golang","gomod","jfrog"],"created_at":"2025-10-10T02:56:25.331Z","updated_at":"2025-10-10T02:56:31.237Z","avatar_url":"https://github.com/jfrog.png","language":"Go","readme":"# Go Modules Absolutizer\n\n\u003e Supported Go version: 1.18+\n\nGo Modules Absolutizer is a Go library, used to search and replace relative paths in go.mod files to absolute paths.\nThe library is used by both the [JFrog Idea Plugin](https://github.com/jfrog/jfrog-idea-plugin) and the [JFrog VS Code Extension](https://github.com/jfrog/jfrog-vscode-extension).\n\n## Project status\n\n[![Test](https://github.com/jfrog/gomod-absolutizer/actions/workflows/test.yml/badge.svg)](https://github.com/jfrog/gomod-absolutizer/actions/workflows/test.yml) [![Go Report Card](https://goreportcard.com/badge/github.com/jfrog/gomod-absolutizer)](https://goreportcard.com/report/github.com/jfrog/gomod-absolutizer)\n\n## Table of Contents\n\n- [Usage](#usage)\n  - [As script](#as-script)\n  - [As executable](#as-executable)\n  - [As library](#as-library)\n- [Example](#example)\n- [Tests](#tests)\n- [Release Notes](#release-notes)\n- [Code contributions](#code-contributions)\n\n## Usage\n\nThe program expects two flags:\n\n| Flag        | Description                                                                                        |\n| ----------- | -------------------------------------------------------------------------------------------------- |\n| `goModPath` | Path to a go.mod.                                                                                  |\n| `wd`        | Path to the working directory, which will be concatenated to the relative path in the go.mod file. |\n\nYou may use it in multiple ways:\n\n### As script\n\n```sh\ngo run . -goModPath=/path/to/go.mod -wd=/path/to/wd\n```\n\n### As executable\n\n```sh\ngo build\n./gomod-absolutizer -goModPath=/path/to/go.mod -wd=/path/to/wd\n```\n\n### As library\n\n```go\nimport (\n    absolutizer \"github.com/jfrog/gomod-absolutizer\"\n)\n\nfunc main() {\n    args := \u0026absolutizer.AbsolutizeArgs{\n        GoModPath:  \"/path/to/go.mod\",\n        WorkingDir: \"/path/to/wd\",\n    }\n    err := absolutizer.Absolutize(args)\n    // Handle error\n}\n\n```\n\n## Example\n\nGiven the following go.mod before running this program:\n\n```\nreplace github.com/jfrog/jfrog-client-go v1.2.3 =\u003e github.com/jfrog/jfrog-client-go v1.2.4\nreplace github.com/jfrog/jfrog-cli-core =\u003e ../jfrog-cli-core\n```\n\nRunning the following command:\n\n```\ngo run . -goModPath=/Users/frogger/code/jfrog-cli/go.mod -wd=/Users/frogger/code/jfrog-cli\n```\n\nWill modify the original go.mod to:\n\n```\nreplace github.com/jfrog/jfrog-client-go v1.2.3 =\u003e github.com/jfrog/jfrog-client-go v1.2.4\nreplace github.com/jfrog/jfrog-cli-core =\u003e /Users/frogger/code/jfrog-cli-core\n```\n\n## Tests\n\nTo run the tests, execute the following command from within the root directory of the project:\n\n```sh\ngo test -v ./...\n```\n\n# Release Notes\n\nThe release notes are available [here](RELEASE.md#release-notes).\n\n# Code Contributions\n\nWe welcome community contribution through pull requests.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfrog%2Fgomod-absolutizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjfrog%2Fgomod-absolutizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfrog%2Fgomod-absolutizer/lists"}