mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 02:11:40 +00:00
refactor: move Pkl module definitions to dedicated package
This commit is contained in:
+3
-2
@@ -7,6 +7,7 @@ import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/ipfs/boxo/files"
|
||||
dwngen "github.com/onsonr/sonr/pkg/dwn/gen"
|
||||
"github.com/onsonr/sonr/pkg/nebula/global"
|
||||
)
|
||||
|
||||
@@ -22,7 +23,7 @@ var (
|
||||
)
|
||||
|
||||
// NewVaultDirectory creates a new directory with the default files
|
||||
func NewVaultDirectory(cnfg *Config) (files.Node, error) {
|
||||
func NewVaultDirectory(cnfg *dwngen.Config) (files.Node, error) {
|
||||
dwnJSON, err := json.Marshal(cnfg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -54,7 +55,7 @@ func IndexHTMLFile() (files.Node, error) {
|
||||
}
|
||||
|
||||
// MarshalConfigFile uses the config template to generate the dwn config file
|
||||
func MarshalConfigFile(c *Config) (files.Node, error) {
|
||||
func MarshalConfigFile(c *dwngen.Config) (files.Node, error) {
|
||||
dwnConfigData, err := json.Marshal(c)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user