Skip to content

Commit

Permalink
Merge pull request #276 from SeanHai/auth
Browse files Browse the repository at this point in the history
add dirs http service need
  • Loading branch information
SeanHai authored Jul 14, 2023
2 parents 60cee71 + 7d3bd4b commit 3b6b0a1
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions cli/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,16 @@ import (

type CurveAdm struct {
// project layout
rootDir string
dataDir string
pluginDir string
logDir string
tempDir string
dbpath string
logpath string
config *configure.CurveAdmConfig
rootDir string
dataDir string
pluginDir string
logDir string
tempDir string
dbpath string
logpath string
httpConfPath string
httpLogPath string
config *configure.CurveAdmConfig

// data pipeline
in io.Reader
Expand Down Expand Up @@ -97,6 +99,8 @@ func NewCurveAdm() (*CurveAdm, error) {
pluginDir: path.Join(rootDir, "plugins"),
logDir: path.Join(rootDir, "logs"),
tempDir: path.Join(rootDir, "temp"),
httpConfPath: path.Join(rootDir, "http/conf"),
httpLogPath: path.Join(rootDir, "http/logs"),
}

err = curveadm.init()
Expand All @@ -116,6 +120,8 @@ func (curveadm *CurveAdm) init() error {
curveadm.pluginDir,
curveadm.logDir,
curveadm.tempDir,
curveadm.httpConfPath,
curveadm.httpLogPath,
}
for _, dir := range dirs {
if err := os.MkdirAll(dir, os.ModePerm); err != nil {
Expand Down

0 comments on commit 3b6b0a1

Please sign in to comment.