mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 09:18:59 +00:00
45f6a74740
Previously a Go package attempting to import Fleet packages would run into an error like "server/kolide/emails.go:93:23: undefined: Asset". This commit refactors bindata asset handling to allow importing Fleet as a library without changing the typical developer experience.
22 lines
616 B
Go
22 lines
616 B
Go
// +build !full
|
|
|
|
package bindata
|
|
|
|
import "os"
|
|
|
|
// This file contains placeholders for the asset functions that would normally
|
|
// allow Fleet to retrieve assets and templates. Providing these placeholders
|
|
// allows Fleet packages to be included as a library with `go get`.
|
|
|
|
func Asset(name string) ([]byte, error) {
|
|
panic("Assets may not be used when running Fleet as a library")
|
|
}
|
|
|
|
func AssetDir(name string) ([]string, error) {
|
|
panic("Assets may not be used when running Fleet as a library")
|
|
}
|
|
|
|
func AssetInfo(name string) (os.FileInfo, error) {
|
|
panic("Assets may not be used when running Fleet as a library")
|
|
}
|