Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 8.2% on proxy.golang.org

proxy.golang.org : github.com/mxmcherry/gogenstatic

Command gogenstatic generates "static" package, which embeds all the files from public root dir ("--src" param, defaults to "./public") and provides HTTP handler to serve them. Example usage: It is intended to be used with go generate: https://blog.golang.org/generate Assuming, you have this project structure: Then you can add this comment: to any of your *.go files (like whatever.go) and run: in your project dir, and it'll generate "static" subpackage, with all the files from "./public/" embedded: Then import generated subpackage and use it's handler: Or, if you want no runtime hash lookups, you can use handler for a single file:

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/mxmcherry/gogenstatic
Keywords: embed-files, generator, go, golang, static
License: Unlicense
Latest release: over 7 years ago
First release: over 7 years ago
Namespace: github.com/mxmcherry
Stars: 1 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 19 days ago

    Loading...
    Readme
    Loading...