Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

xrstf/vangen

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Migration note

Important

vangen has been migrated to codeberg.org/xrstf/vangen.


vangen²

Go Report Card Go docs

Vangen is a tool for generating static HTML for Go vanity import paths.

Go vanity import paths work by serving a HTML file that tells the go get tool where to download the source from. You can still host the source code at Github, BitBucket, but the vanity URL gives you portability and other benefits.

Why

  • Maintain Go vanity import paths with a simple definition file vangen.yaml.
  • Host Go vanity import paths using static hosting. No need for Google AppEngine, Heroku, etc. Host the files on Github Pages, AWS S3, Google Cloud Storage, etc.

Why a Fork?

  • Use YAML instead of JSON for configuration.
  • Add pico.css to make the generated HTML a bit nicer and add dark mode.
  • Rename "sub packages" to "sub modules", which is more clear IMHO.

Install

Download one of the precompiled releases, use the ready-made container image ghcr.io/xrstf/vangen or install from source:

go get go.xrstf.de/vangen

Usage

  1. Create a vangen.yaml (see examples below)
  2. Run vangen
  3. Host the files outputted in vangen/ at your domain
  4. Try it out with go get [domain]/[package]
$ vangen --help
Usage of _build/vangen:
  -c, --config filename    vangen JSON/YAML configuration filename (default "vangen.yaml")
  -o, --output directory   output directory that static files will be written to (default "vangen")
  -V, --version            print program version

Examples

Minimal

The repository type and source properties will be set automatically when url begins with https://github.com or https://gitlab.com. Below is a minimal config for a project hosted on GitHub.

domain: go.xrstf.de
repositories:
  - prefix: optional
    url: https://github.com/leighmcculloch/go-optional
    subs:
      - name: template

About

Tool for generating static HTML for Go vanity import paths.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • Go 92.2%
  • Makefile 6.9%
  • Dockerfile 0.9%