mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
fix: correct comments for exported functions and variables (#1158)
This commit is contained in:
@ -17,7 +17,7 @@ const (
|
|||||||
SystemSettingSecretSessionName SystemSettingName = "secretSessionName"
|
SystemSettingSecretSessionName SystemSettingName = "secretSessionName"
|
||||||
// SystemSettingAllowSignUpName is the key type of allow signup setting.
|
// SystemSettingAllowSignUpName is the key type of allow signup setting.
|
||||||
SystemSettingAllowSignUpName SystemSettingName = "allowSignUp"
|
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"
|
SystemSettingDisablePublicMemosName SystemSettingName = "disablePublicMemos"
|
||||||
// SystemSettingAdditionalStyleName is the key type of additional style.
|
// SystemSettingAdditionalStyleName is the key type of additional style.
|
||||||
SystemSettingAdditionalStyleName SystemSettingName = "additionalStyle"
|
SystemSettingAdditionalStyleName SystemSettingName = "additionalStyle"
|
||||||
@ -69,7 +69,7 @@ func (key SystemSettingName) String() string {
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
SystemSettingAllowSignUpValue = []bool{true, false}
|
SystemSettingAllowSignUpValue = []bool{true, false}
|
||||||
SystemSettingDisbalePublicMemosValue = []bool{true, false}
|
SystemSettingDisablePublicMemosValue = []bool{true, false}
|
||||||
)
|
)
|
||||||
|
|
||||||
type SystemSetting struct {
|
type SystemSetting struct {
|
||||||
@ -113,7 +113,7 @@ func (upsert SystemSettingUpsert) Validate() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
invalid := true
|
invalid := true
|
||||||
for _, v := range SystemSettingDisbalePublicMemosValue {
|
for _, v := range SystemSettingDisablePublicMemosValue {
|
||||||
if value == v {
|
if value == v {
|
||||||
invalid = false
|
invalid = false
|
||||||
break
|
break
|
||||||
|
47
go.mod
47
go.mod
@ -2,21 +2,29 @@ module github.com/usememos/memos
|
|||||||
|
|
||||||
go 1.19
|
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 (
|
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/feeds v1.1.1
|
||||||
github.com/gorilla/sessions v1.2.1
|
github.com/gorilla/sessions v1.2.1
|
||||||
github.com/labstack/echo-contrib v0.13.0
|
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 (
|
require (
|
||||||
@ -72,20 +80,3 @@ require (
|
|||||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // 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
|
|
||||||
)
|
|
||||||
|
@ -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 metadata for website;
|
||||||
// * Get image blob to avoid CORS;
|
// * Get image blob to avoid CORS;
|
||||||
package getter
|
package getter
|
||||||
|
@ -44,7 +44,7 @@ func checkDSN(dataDir string) (string, error) {
|
|||||||
return dataDir, nil
|
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) {
|
func GetProfile() (*Profile, error) {
|
||||||
profile := Profile{}
|
profile := Profile{}
|
||||||
err := viper.Unmarshal(&profile)
|
err := viper.Unmarshal(&profile)
|
||||||
|
@ -34,7 +34,7 @@ func GetSchemaVersion(version string) string {
|
|||||||
return minorVersion + ".0"
|
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 {
|
func IsVersionGreaterOrEqualThan(version, target string) bool {
|
||||||
return semver.Compare(fmt.Sprintf("v%s", version), fmt.Sprintf("v%s", target)) > -1
|
return semver.Compare(fmt.Sprintf("v%s", version), fmt.Sprintf("v%s", target)) > -1
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user