Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
50a99e91
Unverified
Commit
50a99e91
authored
Feb 25, 2023
by
Zhizhen He
Committed by
GitHub
Feb 25, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: correct comments for exported functions and variables (#1158)
parent
57479b25
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
34 deletions
+25
-34
system_setting.go
api/system_setting.go
+3
-3
go.mod
go.mod
+19
-28
http_getter.go
plugin/http_getter/http_getter.go
+1
-1
profile.go
server/profile/profile.go
+1
-1
version.go
server/version/version.go
+1
-1
No files found.
api/system_setting.go
View file @
50a99e91
...
...
@@ -17,7 +17,7 @@ const (
SystemSettingSecretSessionName
SystemSettingName
=
"secretSessionName"
// SystemSettingAllowSignUpName is the key type of allow signup setting.
SystemSettingAllowSignUpName
SystemSettingName
=
"allowSignUp"
// SystemSetting
sDisablePublicMemos
is the key type of disable public memos setting.
// SystemSetting
DisablePublicMemosName
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
}
SystemSettingDis
ba
lePublicMemosValue
=
[]
bool
{
true
,
false
}
SystemSettingDis
ab
lePublicMemosValue
=
[]
bool
{
true
,
false
}
)
type
SystemSetting
struct
{
...
...
@@ -113,7 +113,7 @@ func (upsert SystemSettingUpsert) Validate() error {
}
invalid
:=
true
for
_
,
v
:=
range
SystemSettingDis
ba
lePublicMemosValue
{
for
_
,
v
:=
range
SystemSettingDis
ab
lePublicMemosValue
{
if
value
==
v
{
invalid
=
false
break
...
...
go.mod
View file @
50a99e91
...
...
@@ -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
)
plugin/http_getter/http_getter.go
View file @
50a99e91
// 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
server/profile/profile.go
View file @
50a99e91
...
...
@@ -44,7 +44,7 @@ func checkDSN(dataDir string) (string, error) {
return
dataDir
,
nil
}
// Get
Dev
Profile 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
)
...
...
server/version/version.go
View file @
50a99e91
...
...
@@ -34,7 +34,7 @@ func GetSchemaVersion(version string) string {
return
minorVersion
+
".0"
}
// IsVersionGreater
ThanOrEqualTo
returns true if version is greater than or equal to target.
// IsVersionGreater
OrEqualThan
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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment