mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
check nil
This commit is contained in:
parent
99a91f1444
commit
4a6fb63c8b
|
@ -59,6 +59,13 @@ func filterPlaintextMessages(args []interface{}) (texts []string, pureArgs []int
|
|||
rt := reflect.TypeOf(arg)
|
||||
if rt.Kind() == reflect.Ptr {
|
||||
switch a := arg.(type) {
|
||||
|
||||
case nil:
|
||||
texts = append(texts, "nil")
|
||||
if firstObjectOffset == -1 {
|
||||
firstObjectOffset = idx
|
||||
}
|
||||
|
||||
case types.PlainText:
|
||||
texts = append(texts, a.PlainText())
|
||||
if firstObjectOffset == -1 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user