{"id":13817279,"url":"https://github.com/GoogleCloudPlatform/govanityurls","last_synced_at":"2025-05-15T19:31:06.589Z","repository":{"id":22164774,"uuid":"95474024","full_name":"GoogleCloudPlatform/govanityurls","owner":"GoogleCloudPlatform","description":"Use a custom domain in your Go import path","archived":false,"fork":false,"pushed_at":"2024-08-20T14:22:39.000Z","size":251,"stargazers_count":522,"open_issues_count":17,"forks_count":131,"subscribers_count":24,"default_branch":"main","last_synced_at":"2024-10-29T18:37:09.468Z","etag":null,"topics":["appengine-go","go","golang"],"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/GoogleCloudPlatform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2017-06-26T17:56:30.000Z","updated_at":"2024-10-23T14:20:40.000Z","dependencies_parsed_at":"2024-06-18T15:26:05.502Z","dependency_job_id":"044c6ae4-c6cf-49b1-a320-877bcdf6fe80","html_url":"https://github.com/GoogleCloudPlatform/govanityurls","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fgovanityurls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fgovanityurls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fgovanityurls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fgovanityurls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoogleCloudPlatform","download_url":"https://codeload.github.com/GoogleCloudPlatform/govanityurls/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254407272,"owners_count":22066205,"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":["appengine-go","go","golang"],"created_at":"2024-08-04T06:00:39.296Z","updated_at":"2025-05-15T19:31:06.024Z","avatar_url":"https://github.com/GoogleCloudPlatform.png","language":"Go","funding_links":[],"categories":["Misc"],"sub_categories":[],"readme":"# Go Vanity URLs\n\nGo Vanity URLs is a simple Go server that allows you\nto set custom import paths for your Go packages.\nIt also can run on Google App Engine.\n\n## Quickstart\n\nInstall and run the binary:\n\n```\n$ go get -u github.com/GoogleCloudPlatform/govanityurls\n$ # update vanity.yaml\n$ govanityurls\n$ # open http://localhost:8080\n```\n\n\n### Google App Engine\n\nInstall [gcloud](https://cloud.google.com/sdk/downloads) and install Go App Engine component:\n\n```\n$ gcloud components install app-engine-go\n```\n\nSetup a [custom domain](https://cloud.google.com/appengine/docs/standard/python/using-custom-domains-and-ssl) for your app.\n\nGet the application:\n```\ngit clone https://github.com/GoogleCloudPlatform/govanityurls\ncd govanityurls\n```\n\nEdit `vanity.yaml` to add any number of git repos. E.g., `customdomain.com/portmidi` will\nserve the [https://github.com/rakyll/portmidi](https://github.com/rakyll/portmidi) repo.\n\n```\npaths:\n  /portmidi:\n    repo: https://github.com/rakyll/portmidi\n```\n\nYou can add as many rules as you wish.\n\nDeploy the app:\n\n```\n$ gcloud app deploy\n```\n\nThat's it! You can use `go get` to get the package from your custom domain.\n\n```\n$ go get customdomain.com/portmidi\n```\n\n### Running in other environments\n\nYou can also deploy this as an App Engine Flexible app by changing the\n`app.yaml` file:\n\n```\nruntime: go\nenv: flex\n```\n\nThis project is a normal Go HTTP server, so you can also incorporate the\nhandler into larger Go servers.\n\n## Configuration File\n\n```\nhost: example.com\ncache_max_age: 3600\npaths:\n  /foo:\n    repo: https://github.com/example/foo\n    display: \"https://github.com/example/foo https://github.com/example/foo/tree/master{/dir} https://github.com/example/foo/blob/master{/dir}/{file}#L{line}\"\n    vcs: git\n```\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth scope=\"col\"\u003eKey\u003c/th\u003e\n      \u003cth scope=\"col\"\u003eRequired\u003c/th\u003e\n      \u003cth scope=\"col\"\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth scope=\"row\"\u003e\u003ccode\u003ecache_max_age\u003c/code\u003e\u003c/th\u003e\n      \u003ctd\u003eoptional\u003c/td\u003e\n      \u003ctd\u003eThe amount of time to cache package pages in seconds.  Controls the \u003ccode\u003emax-age\u003c/code\u003e directive sent in the \u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control\"\u003e\u003ccode\u003eCache-Control\u003c/code\u003e\u003c/a\u003e HTTP header.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth scope=\"row\"\u003e\u003ccode\u003ehost\u003c/code\u003e\u003c/th\u003e\n      \u003ctd\u003eoptional\u003c/td\u003e\n      \u003ctd\u003eHost name to use in meta tags.  If omitted, uses the App Engine default version host or the Host header on non-App Engine Standard environments.  You can use this option to fix the host when using this service behind a reverse proxy or a \u003ca href=\"https://cloud.google.com/appengine/docs/standard/go/how-requests-are-routed#routing_with_a_dispatch_file\"\u003ecustom dispatch file\u003c/a\u003e.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth scope=\"row\"\u003e\u003ccode\u003epaths\u003c/code\u003e\u003c/th\u003e\n      \u003ctd\u003erequired\u003c/td\u003e\n      \u003ctd\u003eMap of paths to path configurations.  Each key is a path that will point to the root of a repository hosted elsewhere.  The fields are documented in the Path Configuration section below.\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### Path Configuration\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth scope=\"col\"\u003eKey\u003c/th\u003e\n      \u003cth scope=\"col\"\u003eRequired\u003c/th\u003e\n      \u003cth scope=\"col\"\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth scope=\"row\"\u003e\u003ccode\u003edisplay\u003c/code\u003e\u003c/th\u003e\n      \u003ctd\u003eoptional\u003c/td\u003e\n      \u003ctd\u003eThe last three fields of the \u003ca href=\"https://github.com/golang/gddo/wiki/Source-Code-Links\"\u003e\u003ccode\u003ego-source\u003c/code\u003e meta tag\u003c/a\u003e.  If omitted, it is inferred from the code hosting service if possible.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth scope=\"row\"\u003e\u003ccode\u003erepo\u003c/code\u003e\u003c/th\u003e\n      \u003ctd\u003erequired\u003c/td\u003e\n      \u003ctd\u003eRoot URL of the repository as it would appear in \u003ca href=\"https://golang.org/cmd/go/#hdr-Remote_import_paths\"\u003e\u003ccode\u003ego-import\u003c/code\u003e meta tag\u003c/a\u003e.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth scope=\"row\"\u003e\u003ccode\u003evcs\u003c/code\u003e\u003c/th\u003e\n      \u003ctd\u003erequired if ambiguous\u003c/td\u003e\n      \u003ctd\u003eIf the version control system cannot be inferred (e.g. for Bitbucket or a custom domain), then this specifies the version control system as it would appear in \u003ca href=\"https://golang.org/cmd/go/#hdr-Remote_import_paths\"\u003e\u003ccode\u003ego-import\u003c/code\u003e meta tag\u003c/a\u003e.  This can be one of \u003ccode\u003egit\u003c/code\u003e, \u003ccode\u003ehg\u003c/code\u003e, \u003ccode\u003esvn\u003c/code\u003e, or \u003ccode\u003ebzr\u003c/code\u003e.\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGoogleCloudPlatform%2Fgovanityurls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGoogleCloudPlatform%2Fgovanityurls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGoogleCloudPlatform%2Fgovanityurls/lists"}