Categorygo.osspkg.com/static
repositorypackage
1.4.0
Repository: https://github.com/osspkg/go-static.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

go-static

Coverage Status Release Go Report Card CI

Library for embedding static files inside an application

Install as tool

go install go.osspkg.com/static/cmd/static@latest

Packaging

//go:generate static <DIR> <VAR>
  • DIR - Path to the static folder
  • VAR - A variable containing static.Reader interface

Example go code

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.