하드코딩된 폴더들 const로 뺌
This commit is contained in:
@ -45,9 +45,10 @@ func NewHoustonHandler() HoustonServerWithHandler {
|
||||
}
|
||||
|
||||
func (h *houstonHandler) RegisterHandlers(serveMux *http.ServeMux, prefix string) error {
|
||||
storagePath := loadServerConfig().StorageRoot
|
||||
h.deployPath = path.Join(storagePath, "deploys")
|
||||
h.downloadPath = path.Join(storagePath, "downloads")
|
||||
config := loadServerConfig()
|
||||
storagePath := config.StorageRoot
|
||||
h.deployPath = path.Join(storagePath, sub_folder_name_deploys)
|
||||
h.downloadPath = path.Join(storagePath, sub_folder_name_downloads)
|
||||
|
||||
if err := os.MkdirAll(h.deployPath, 0775); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user