2022-03-11 13:47:20 +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-11 13:47:20 +00:00
|
|
|
package storagenodeweb
|
|
|
|
|
|
|
|
import (
|
|
|
|
"embed"
|
|
|
|
"fmt"
|
|
|
|
"io/fs"
|
|
|
|
)
|
|
|
|
|
|
|
|
//go:embed dist/*
|
|
|
|
var assets embed.FS
|
|
|
|
|
|
|
|
// Assets contains either the built storagenode from web/storagenode/dist directory
|
|
|
|
// or it is empty.
|
|
|
|
var Assets = func() fs.FS {
|
|
|
|
dist, err := fs.Sub(assets, "dist")
|
|
|
|
if err != nil {
|
|
|
|
panic(fmt.Errorf("invalid embedding: %w", err))
|
|
|
|
}
|
|
|
|
return dist
|
|
|
|
}()
|