storj/satellite/admin/ui/assets.go
Egon Elbre 4a6c2e2a9c satellite/admin/ui: avoid needing an additional copy
This also fixes the build order. Unfortunately we need
to ensure that the web frontends are built before installing
Go binaries.

Fixes https://github.com/storj/storj/issues/4654

Change-Id: I5d1c83125fd3d1a454d3400b2cbdd44bd3f2250c
2022-03-25 11:42:22 +02:00

23 lines
390 B
Go

// Copyright (C) 2022 Storj Labs, Inc.
// See LICENSE for copying information.
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
}()