Read the file from the embedded FS instead of the real FS

master
Aadhavan Srinivasan 1 week ago
parent 565205fb5e
commit fd256bc7c7

@ -3,7 +3,6 @@ package main
import (
"embed"
"errors"
"gitea.twomorecents.org/Rockingcool/ccat/stack"
"io/fs"
"os"
"path/filepath"
@ -11,6 +10,8 @@ import (
"runtime"
"strings"
"gitea.twomorecents.org/Rockingcool/ccat/stack"
"gopkg.in/yaml.v2"
)
@ -49,7 +50,7 @@ func generateDefaultConfigs(configOutputPath string) error {
relPath, _ := filepath.Rel("config", path)
dstPath := filepath.Join(configOutputPath, relPath) // Destination path
data, err := os.ReadFile(path)
data, err := storedConfigs.ReadFile(path)
if err != nil {
return err
}

Loading…
Cancel
Save