fix: Function params involve heavy amount of copying (#622)
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
// New func implements the storage interface for gorush (https://github.com/appleboy/gorush)
|
||||
func New(config config.ConfYaml) *Storage {
|
||||
func New(config *config.ConfYaml) *Storage {
|
||||
return &Storage{
|
||||
config: config,
|
||||
}
|
||||
@@ -20,7 +20,7 @@ func New(config config.ConfYaml) *Storage {
|
||||
|
||||
// Storage is interface structure
|
||||
type Storage struct {
|
||||
config config.ConfYaml
|
||||
config *config.ConfYaml
|
||||
db *buntdb.DB
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user