mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-03 07:26:45 +00:00
Optimisation: large structs/huge param fixes (part 2) (#262)
* updated golangci config to enable hugeparam linter * ModifyOrder struct usage converted to a pointer * OrderBook conversion to struct * More conversion of large structs to pointers * updated golangci config to enable hugeparam linter * ModifyOrder struct usage converted to a pointer * OrderBook conversion to struct * More conversion of large structs to pointers * disabled hugeParam check for golang again * changed based on suggested feedback and fix for no default provider * fixed typing
This commit is contained in:
@@ -347,7 +347,7 @@ func (b *BaseCodes) RegisterFiat(c string) (Code, error) {
|
||||
}
|
||||
|
||||
// LoadItem sets item data
|
||||
func (b *BaseCodes) LoadItem(item Item) error {
|
||||
func (b *BaseCodes) LoadItem(item *Item) error {
|
||||
b.mtx.Lock()
|
||||
defer b.mtx.Unlock()
|
||||
for i := range b.Items {
|
||||
@@ -386,7 +386,7 @@ func (b *BaseCodes) LoadItem(item Item) error {
|
||||
}
|
||||
}
|
||||
|
||||
b.Items = append(b.Items, &item)
|
||||
b.Items = append(b.Items, item)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ type Item struct {
|
||||
}
|
||||
|
||||
// String conforms to the stringer interface
|
||||
func (i Item) String() string {
|
||||
func (i *Item) String() string {
|
||||
return i.FullName
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user