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
05f73a22
Commit
05f73a22
authored
May 02, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: tweak linter
parent
775b7933
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
main.go
bin/memos/main.go
+1
-1
s3.go
plugin/storage/s3/s3.go
+1
-1
v1.go
server/router/api/v1/v1.go
+1
-1
No files found.
bin/memos/main.go
View file @
05f73a22
...
@@ -43,7 +43,7 @@ var (
...
@@ -43,7 +43,7 @@ var (
rootCmd
=
&
cobra
.
Command
{
rootCmd
=
&
cobra
.
Command
{
Use
:
"memos"
,
Use
:
"memos"
,
Short
:
`An open source, lightweight note-taking service. Easily capture and share your great thoughts.`
,
Short
:
`An open source, lightweight note-taking service. Easily capture and share your great thoughts.`
,
Run
:
func
(
_
cmd
*
cobra
.
Command
,
_args
[]
string
)
{
Run
:
func
(
_
*
cobra
.
Command
,
_
[]
string
)
{
ctx
,
cancel
:=
context
.
WithCancel
(
context
.
Background
())
ctx
,
cancel
:=
context
.
WithCancel
(
context
.
Background
())
dbDriver
,
err
:=
db
.
NewDBDriver
(
instanceProfile
)
dbDriver
,
err
:=
db
.
NewDBDriver
(
instanceProfile
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
plugin/storage/s3/s3.go
View file @
05f73a22
...
@@ -68,7 +68,7 @@ func (c *Client) UploadObject(ctx context.Context, key string, fileType string,
...
@@ -68,7 +68,7 @@ func (c *Client) UploadObject(ctx context.Context, key string, fileType string,
// PresignGetObject presigns an object in S3.
// PresignGetObject presigns an object in S3.
func
(
c
*
Client
)
PresignGetObject
(
ctx
context
.
Context
,
key
string
)
(
string
,
error
)
{
func
(
c
*
Client
)
PresignGetObject
(
ctx
context
.
Context
,
key
string
)
(
string
,
error
)
{
presignClient
:=
s3
.
NewPresignClient
(
c
.
Client
)
presignClient
:=
s3
.
NewPresignClient
(
c
.
Client
)
presignResult
,
err
:=
presignClient
.
PresignGetObject
(
c
ontext
.
TODO
()
,
&
s3
.
GetObjectInput
{
presignResult
,
err
:=
presignClient
.
PresignGetObject
(
c
tx
,
&
s3
.
GetObjectInput
{
Bucket
:
aws
.
String
(
*
c
.
Bucket
),
Bucket
:
aws
.
String
(
*
c
.
Bucket
),
Key
:
aws
.
String
(
key
),
Key
:
aws
.
String
(
key
),
},
func
(
opts
*
s3
.
PresignOptions
)
{
},
func
(
opts
*
s3
.
PresignOptions
)
{
...
...
server/router/api/v1/v1.go
View file @
05f73a22
...
@@ -117,7 +117,7 @@ func (s *APIV1Service) RegisterGateway(ctx context.Context, echoServer *echo.Ech
...
@@ -117,7 +117,7 @@ func (s *APIV1Service) RegisterGateway(ctx context.Context, echoServer *echo.Ech
// GRPC web proxy.
// GRPC web proxy.
options
:=
[]
grpcweb
.
Option
{
options
:=
[]
grpcweb
.
Option
{
grpcweb
.
WithCorsForRegisteredEndpointsOnly
(
false
),
grpcweb
.
WithCorsForRegisteredEndpointsOnly
(
false
),
grpcweb
.
WithOriginFunc
(
func
(
origin
string
)
bool
{
grpcweb
.
WithOriginFunc
(
func
(
_
string
)
bool
{
return
true
return
true
}),
}),
}
}
...
...
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