mirror of
https://github.com/daeuniverse/dae.git
synced 2024-12-23 01:14:46 +07:00
chore: allow to modify app name and assets dir name (#144)
This commit is contained in:
parent
962018d14b
commit
b36b56ce6d
@ -8,6 +8,7 @@ package assets
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/daeuniverse/dae/common/consts"
|
||||||
"io/fs"
|
"io/fs"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -69,7 +70,7 @@ func (c *LocationFinder) GetLocationAsset(log *logrus.Logger, filename string) (
|
|||||||
|
|
||||||
// Search dirs.
|
// Search dirs.
|
||||||
var searchDirs []string
|
var searchDirs []string
|
||||||
folder := "dae"
|
folder := consts.AppName
|
||||||
// check if DAE_LOCATION_ASSET is set
|
// check if DAE_LOCATION_ASSET is set
|
||||||
location := os.Getenv("DAE_LOCATION_ASSET")
|
location := os.Getenv("DAE_LOCATION_ASSET")
|
||||||
if location != "" {
|
if location != "" {
|
||||||
|
5
common/consts/app.go
Normal file
5
common/consts/app.go
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package consts
|
||||||
|
|
||||||
|
var (
|
||||||
|
AppName = "dae"
|
||||||
|
)
|
@ -13,7 +13,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
AppName = "dae"
|
|
||||||
BpfPinRoot = "/sys/fs/bpf"
|
BpfPinRoot = "/sys/fs/bpf"
|
||||||
|
|
||||||
TaskCommLen = 16
|
TaskCommLen = 16
|
||||||
|
Loading…
Reference in New Issue
Block a user