static.go 218 B

123456789101112131415
  1. //go:build go1.16
  2. // +build go1.16
  3. package nsqadmin
  4. import (
  5. "embed"
  6. )
  7. //go:embed static/build
  8. var static embed.FS
  9. func staticAsset(name string) ([]byte, error) {
  10. return static.ReadFile("static/build/" + name)
  11. }