mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
types: always use pointer on duration
This commit is contained in:
parent
4388bc209b
commit
d27786d5ae
|
@ -13,8 +13,8 @@ import (
|
|||
|
||||
type Duration time.Duration
|
||||
|
||||
func (d Duration) Duration() time.Duration {
|
||||
return time.Duration(d)
|
||||
func (d *Duration) Duration() time.Duration {
|
||||
return time.Duration(*d)
|
||||
}
|
||||
|
||||
func (d *Duration) UnmarshalJSON(data []byte) error {
|
||||
|
|
Loading…
Reference in New Issue
Block a user