fix: Function params involve heavy amount of copying (#622)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user