https://github.com/osspkg/go-static
https://github.com/osspkg/go-static
go golang package static-include
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/osspkg/go-static
- Owner: osspkg
- License: bsd-3-clause
- Created: 2021-02-11T22:04:31.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-04T01:28:46.000Z (about 2 years ago)
- Last Synced: 2025-02-14T15:17:00.977Z (about 1 year ago)
- Topics: go, golang, package, static-include
- Language: Go
- Homepage:
- Size: 54.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-static
[](https://coveralls.io/github/osspkg/go-static?branch=master)
[](https://github.com/osspkg/go-static/releases/latest)
[](https://goreportcard.com/report/github.com/osspkg/go-static)
[](https://github.com/osspkg/go-static/actions/workflows/ci.yml)
_Library for embedding static files inside an application_
# Install as tool
```bash
go install go.osspkg.com/static/cmd/static@latest
```
# Packaging
```go
//go:generate static
```
* DIR - Path to the static folder
* VAR - A variable containing `static.Reader` interface
## Example go code
```go
package example
import (
"fmt"
"go.osspkg.com/static"
)
//go:generate static ./.. ui
var ui static.Reader
func run() {
fmt.Println(ui.List())
}
```
## License
BSD-3-Clause License. See the LICENSE file for details.