fix: Function params involve heavy amount of copying (#622)

This commit is contained in:
Bo-Yi Wu
2021-08-02 14:07:30 +08:00
committed by GitHub
parent 6d65c1ea6e
commit 349c0c8c1d
21 changed files with 87 additions and 88 deletions

View File

@@ -13,7 +13,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,
}
@@ -21,7 +21,7 @@ func New(config config.ConfYaml) *Storage {
// Storage is interface structure
type Storage struct {
config config.ConfYaml
config *config.ConfYaml
opts badger.Options
name string
db *badger.DB