From: bruce Date: Mon, 4 Nov 2024 15:45:06 +0000 (+0000) Subject: fix(uzsdk): 1, remove models. X-Git-Tag: v0.3.1 X-Git-Url: https://git.uzoombox.com/git/?a=commitdiff_plain;h=5ee7debe7edabba7bef3dac273d6f42e66ecb4d8;p=uzsdk-v0.3.1.git fix(uzsdk): 1, remove models. --- diff --git a/models/variables.go b/models/variables.go deleted file mode 100644 index 5fddfdf..0000000 --- a/models/variables.go +++ /dev/null @@ -1,23 +0,0 @@ -package models - -import ( - "log" - "os" - - "git.uzoombox.com/git/uzsdk/utils/osutil" -) - -var ( - AppDir string // application directory - CurDir string // current working directory -) - -func init() { - AppDir = osutil.GetAppDirectory() - - dir, err := os.Getwd() - if err != nil { - log.Fatal(err) - } - CurDir = dir -} diff --git a/uzsdk/configuration.go b/uzsdk/configuration.go index 335f0e6..0517d09 100644 --- a/uzsdk/configuration.go +++ b/uzsdk/configuration.go @@ -5,9 +5,6 @@ package uzsdk import ( "compress/gzip" "fmt" - "path/filepath" - - "git.uzoombox.com/git/uzsdk/models" ) // Configuration defines application's configuration. @@ -74,9 +71,6 @@ func (setting *Configuration) Check() { if setting.Service.DataDirectory == "" { setting.Service.DataDirectory = "/data/uzoombox/cloud" } - if filepath.Dir(setting.Service.DataDirectory) == "." { - setting.Service.DataDirectory = filepath.Join(models.AppDir, setting.Service.DataDirectory) - } if len(setting.Service.TrustedProxies) == 0 { setting.Service.TrustedProxies = append(setting.Service.TrustedProxies, "127.0.0.1") } diff --git a/version.go b/version.go index da246ac..8d6c141 100644 --- a/version.go +++ b/version.go @@ -2,4 +2,4 @@ package uzsdk // Version is the current opensdk's version. -const Version = "0.3.0" +const Version = "0.3.1"