mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: tweak linter
This commit is contained in:
@ -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 {
|
||||||
|
@ -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(context.TODO(), &s3.GetObjectInput{
|
presignResult, err := presignClient.PresignGetObject(ctx, &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) {
|
||||||
|
@ -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
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user