Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.77 KB

README.md

File metadata and controls

41 lines (29 loc) · 1.77 KB

Extended HTML for Awesome Go

This repo provides a slightly enhanced HTML version of the awesome Awesome Go repository.

All credits for the content go the project and its countless contributors. Thanks for providing such a great overview of awesome packages for Go – Share some love if you like it 🦄

Build HTML

  1. Get a GitHub access token

  2. Build the HTML by running this command with your access token:

    GITHUB_ACCESS_TOKEN=... go run main.go

    You can run it without a token, but you will probably reach the rate limit.

  3. Open index.html file in your favorite browser

Technical details

The generation of the HTML works as follows:

  1. The README.md of Awesome Go is downloaded and parsed into categories and packages.
  2. Details about GitHub repositories are being loaded and added.
  3. The data is rendered as HTML, with the help of html/template. The template itself mainly uses Bootstrap, jQuery and DataTables

To limit repetitive requests to GitHub, the responses are cache in a local file cached with onecache. The cache can be flushed by passing the -flush=true flag to the run command:

GITHUB_ACCESS_TOKEN=... go run main.go -flush=true

Disclaimer

This tool highly relies on the current format of the Awesome Go README.md. As long as that doesn't change too much, the parsing should be able to handle it.