diff --git a/api/system_setting.go b/api/system_setting.go index 79ed1794..61ff2e11 100644 --- a/api/system_setting.go +++ b/api/system_setting.go @@ -17,7 +17,7 @@ const ( SystemSettingSecretSessionName SystemSettingName = "secretSessionName" // SystemSettingAllowSignUpName is the key type of allow signup setting. SystemSettingAllowSignUpName SystemSettingName = "allowSignUp" - // SystemSettingsDisablePublicMemos is the key type of disable public memos setting. + // SystemSettingDisablePublicMemosName is the key type of disable public memos setting. SystemSettingDisablePublicMemosName SystemSettingName = "disablePublicMemos" // SystemSettingAdditionalStyleName is the key type of additional style. SystemSettingAdditionalStyleName SystemSettingName = "additionalStyle" @@ -69,7 +69,7 @@ func (key SystemSettingName) String() string { var ( SystemSettingAllowSignUpValue = []bool{true, false} - SystemSettingDisbalePublicMemosValue = []bool{true, false} + SystemSettingDisablePublicMemosValue = []bool{true, false} ) type SystemSetting struct { @@ -113,7 +113,7 @@ func (upsert SystemSettingUpsert) Validate() error { } invalid := true - for _, v := range SystemSettingDisbalePublicMemosValue { + for _, v := range SystemSettingDisablePublicMemosValue { if value == v { invalid = false break diff --git a/go.mod b/go.mod index d0c478e0..7a95fac7 100644 --- a/go.mod +++ b/go.mod @@ -2,21 +2,29 @@ module github.com/usememos/memos go 1.19 -require github.com/mattn/go-sqlite3 v1.14.9 - -require github.com/google/uuid v1.3.0 - -require ( - golang.org/x/crypto v0.1.0 - golang.org/x/net v0.6.0 -) - -require github.com/labstack/echo/v4 v4.9.0 - require ( + github.com/aws/aws-sdk-go-v2 v1.17.4 + github.com/aws/aws-sdk-go-v2/config v1.18.12 + github.com/aws/aws-sdk-go-v2/credentials v1.13.12 + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.51 + github.com/aws/aws-sdk-go-v2/service/s3 v1.30.3 + github.com/google/uuid v1.3.0 github.com/gorilla/feeds v1.1.1 github.com/gorilla/sessions v1.2.1 github.com/labstack/echo-contrib v0.13.0 + github.com/labstack/echo/v4 v4.9.0 + github.com/mattn/go-sqlite3 v1.14.9 + github.com/pkg/errors v0.9.1 + github.com/segmentio/analytics-go v3.1.0+incompatible + github.com/spf13/cobra v1.6.1 + github.com/spf13/viper v1.15.0 + github.com/stretchr/testify v1.8.1 + go.uber.org/zap v1.24.0 + golang.org/x/crypto v0.1.0 + golang.org/x/exp v0.0.0-20230111222715-75897c7a292a + golang.org/x/mod v0.6.0 + golang.org/x/net v0.6.0 + golang.org/x/oauth2 v0.5.0 ) require ( @@ -72,20 +80,3 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -require ( - github.com/aws/aws-sdk-go-v2 v1.17.4 - github.com/aws/aws-sdk-go-v2/config v1.18.12 - github.com/aws/aws-sdk-go-v2/credentials v1.13.12 - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.51 - github.com/aws/aws-sdk-go-v2/service/s3 v1.30.3 - github.com/pkg/errors v0.9.1 - github.com/segmentio/analytics-go v3.1.0+incompatible - github.com/spf13/cobra v1.6.1 - github.com/spf13/viper v1.15.0 - github.com/stretchr/testify v1.8.1 - go.uber.org/zap v1.24.0 - golang.org/x/exp v0.0.0-20230111222715-75897c7a292a - golang.org/x/mod v0.6.0 - golang.org/x/oauth2 v0.5.0 -) diff --git a/plugin/http_getter/http_getter.go b/plugin/http_getter/http_getter.go index db171171..aaaaa7cd 100644 --- a/plugin/http_getter/http_getter.go +++ b/plugin/http_getter/http_getter.go @@ -1,4 +1,4 @@ -// getter is using to get resources from url. +// Package getter is using to get resources from url. // * Get metadata for website; // * Get image blob to avoid CORS; package getter diff --git a/server/profile/profile.go b/server/profile/profile.go index 013c6770..0e80194e 100644 --- a/server/profile/profile.go +++ b/server/profile/profile.go @@ -44,7 +44,7 @@ func checkDSN(dataDir string) (string, error) { return dataDir, nil } -// GetDevProfile will return a profile for dev or prod. +// GetProfile will return a profile for dev or prod. func GetProfile() (*Profile, error) { profile := Profile{} err := viper.Unmarshal(&profile) diff --git a/server/version/version.go b/server/version/version.go index ae071390..68c0edd6 100644 --- a/server/version/version.go +++ b/server/version/version.go @@ -34,7 +34,7 @@ func GetSchemaVersion(version string) string { return minorVersion + ".0" } -// IsVersionGreaterThanOrEqualTo returns true if version is greater than or equal to target. +// IsVersionGreaterOrEqualThan returns true if version is greater than or equal to target. func IsVersionGreaterOrEqualThan(version, target string) bool { return semver.Compare(fmt.Sprintf("v%s", version), fmt.Sprintf("v%s", target)) > -1 }