2022-03-23 13:29:47 +00:00
|
|
|
// Copyright (C) 2022 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
2022-03-29 10:42:53 +01:00
|
|
|
//go:build !noembed
|
|
|
|
// +build !noembed
|
|
|
|
|
2022-03-23 13:29:47 +00:00
|
|
|
package adminui
|
|
|
|
|
|
|
|
import (
|
|
|
|
"embed"
|
|
|
|
"fmt"
|
|
|
|
"io/fs"
|
|
|
|
)
|
|
|
|
|
|
|
|
//go:embed build/*
|
|
|
|
var assets embed.FS
|
|
|
|
|
|
|
|
// Assets contains either the built admin/ui or it is empty.
|
|
|
|
var Assets = func() fs.FS {
|
|
|
|
build, err := fs.Sub(assets, "build")
|
|
|
|
if err != nil {
|
|
|
|
panic(fmt.Errorf("invalid embedding: %w", err))
|
|
|
|
}
|
|
|
|
return build
|
|
|
|
}()
|