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

@@ -21,7 +21,7 @@ func (s *Storage) getLevelDB(key string, count *int64) {
}
// 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,
}
@@ -29,7 +29,7 @@ func New(config config.ConfYaml) *Storage {
// Storage is interface structure
type Storage struct {
config config.ConfYaml
config *config.ConfYaml
db *leveldb.DB
}