From fbeccbcf2925e4b76d4f0a2b3ac13c4c5c0c3dac Mon Sep 17 00:00:00 2001 From: refaktor Date: Sun, 4 Aug 2024 12:05:21 +0200 Subject: [PATCH] second round of fixes for golangci-lint --- evaldo/builtins_bcrypt.go | 8 ++++---- evaldo/builtins_bson.go | 4 ++-- evaldo/builtins_crypto.go | 12 ++++++------ evaldo/builtins_email.go | 1 - evaldo/builtins_html.go | 18 ++++++------------ evaldo/builtins_http.go | 12 ++++++------ evaldo/builtins_mail.go | 8 ++++---- evaldo/builtins_mysql.go | 2 +- evaldo/builtins_psql.go | 2 +- evaldo/builtins_psutil.go | 4 ++-- evaldo/builtins_psutil_not.go | 4 ++-- evaldo/builtins_smtpd.go | 13 ++++++++++--- evaldo/builtins_sqlite.go | 6 +++--- evaldo/builtins_ssh.go | 4 ++-- evaldo/builtins_ssh_not.go | 4 ++-- evaldo/builtins_sxml.go | 12 +++++------- evaldo/builtins_telegrambot.go | 7 +++++-- 17 files changed, 61 insertions(+), 60 deletions(-) diff --git a/evaldo/builtins_bcrypt.go b/evaldo/builtins_bcrypt.go index b5dddbc4..1ee55e30 100755 --- a/evaldo/builtins_bcrypt.go +++ b/evaldo/builtins_bcrypt.go @@ -20,7 +20,7 @@ func __bcrypt_hash(ps *env.ProgramState, arg0 env.Object, arg1 env.Object, arg2 ps.FailureFlag = true return MakeBuiltinError(ps, "Problem in hashing.", "__bcrypt_hash") } - return env.String{string(bytes)} + return env.NewString(string(bytes)) default: ps.FailureFlag = true return MakeArgError(ps, 1, []env.Type{env.StringType}, "__bcrypt_hash") @@ -34,9 +34,9 @@ func __bcrypt_check(ps *env.ProgramState, arg0 env.Object, arg1 env.Object, arg2 case env.String: err := bcrypt.CompareHashAndPassword([]byte(hash.Value), []byte(password.Value)) if err == nil { - return env.Integer{1} + return env.NewInteger(1) } else { - return env.Integer{0} + return env.NewInteger(0) } default: ps.FailureFlag = true @@ -55,7 +55,7 @@ func __generate_token(ps *env.ProgramState, arg0 env.Object, arg1 env.Object, ar if _, err := rand.Read(b); err != nil { return MakeBuiltinError(ps, "Problem reading random stream.", "__generate_token") } - return env.String{hex.EncodeToString(b)} + return env.NewString(hex.EncodeToString(b)) default: ps.FailureFlag = true return MakeArgError(ps, 1, []env.Type{env.IntegerType}, "__generate_token") diff --git a/evaldo/builtins_bson.go b/evaldo/builtins_bson.go index 76b5d1c5..f2bf146b 100644 --- a/evaldo/builtins_bson.go +++ b/evaldo/builtins_bson.go @@ -89,7 +89,7 @@ func BsonToValue_Map(ps *env.ProgramState, val any, typ string, meta any, topLev fmt.Printf("Type: %T\n", val)*/ switch rval := val.(type) { case int64: - return *env.NewInteger(int64(rval)) + return *env.NewInteger(rval) case float32: return *env.NewDecimal(float64(rval)) case float64: @@ -109,7 +109,7 @@ func BsonToValue_Map(ps *env.ProgramState, val any, typ string, meta any, topLev case bson.A: rcols := make([]string, len(cols)) for i, rr := range cols { - rcols[i] = string(rr.(string)) + rcols[i] = rr.(string) } spr := env.NewSpreadsheet(rcols) //rows := make([]interface{}, len(spr.Cols)) diff --git a/evaldo/builtins_crypto.go b/evaldo/builtins_crypto.go index faba41ae..384ebe37 100755 --- a/evaldo/builtins_crypto.go +++ b/evaldo/builtins_crypto.go @@ -74,7 +74,7 @@ var Builtins_crypto = map[string]*env.Builtin{ Fn: func(ps *env.ProgramState, arg0 env.Object, arg1 env.Object, arg2 env.Object, arg3 env.Object, arg4 env.Object) env.Object { switch addr := arg0.(type) { case env.Native: - return env.String{hex.EncodeToString(addr.Value.([]byte))} + return env.NewString(hex.EncodeToString(addr.Value.([]byte))) default: ps.FailureFlag = true return MakeArgError(ps, 1, []env.Type{env.NativeType}, "Go-bytes//to-string") @@ -88,7 +88,7 @@ var Builtins_crypto = map[string]*env.Builtin{ Fn: func(ps *env.ProgramState, arg0 env.Object, arg1 env.Object, arg2 env.Object, arg3 env.Object, arg4 env.Object) env.Object { switch addr := arg0.(type) { case env.Native: - return env.String{hex.EncodeToString(addr.Value.(ed25519.PublicKey))} + return env.NewString(hex.EncodeToString(addr.Value.(ed25519.PublicKey))) default: ps.FailureFlag = true return MakeArgError(ps, 1, []env.Type{env.NativeType}, "Ed25519-pub-key//to-string") @@ -102,7 +102,7 @@ var Builtins_crypto = map[string]*env.Builtin{ Fn: func(ps *env.ProgramState, arg0 env.Object, arg1 env.Object, arg2 env.Object, arg3 env.Object, arg4 env.Object) env.Object { switch addr := arg0.(type) { case env.Native: - return env.String{hex.EncodeToString(addr.Value.(ed25519.PrivateKey))} + return env.NewString(hex.EncodeToString(addr.Value.(ed25519.PrivateKey))) default: ps.FailureFlag = true return MakeArgError(ps, 1, []env.Type{env.NativeType}, "Ed25519-priv-key//to-string") @@ -120,8 +120,8 @@ var Builtins_crypto = map[string]*env.Builtin{ ps.FailureFlag = true return MakeBuiltinError(ps, "Failed to generate keys.", "ed25519-generate-keys") } - keys[0] = *env.NewNative(ps.Idx, ed25519.PublicKey(puk), "Ed25519-pub-key") - keys[1] = *env.NewNative(ps.Idx, ed25519.PrivateKey(pvk), "Ed25519-priv-key") + keys[0] = *env.NewNative(ps.Idx, puk, "Ed25519-pub-key") + keys[1] = *env.NewNative(ps.Idx, pvk, "Ed25519-priv-key") ser := *env.NewTSeries(keys) return *env.NewBlock(ser) }, @@ -208,7 +208,7 @@ var Builtins_crypto = map[string]*env.Builtin{ h := sha512.New() h.Write([]byte(s.Value)) bs := h.Sum(nil) - return env.String{hex.EncodeToString(bs[:])} + return env.NewString(hex.EncodeToString(bs[:])) default: ps.FailureFlag = true return MakeArgError(ps, 1, []env.Type{env.StringType}, "sha512") diff --git a/evaldo/builtins_email.go b/evaldo/builtins_email.go index f6f52738..81080c62 100755 --- a/evaldo/builtins_email.go +++ b/evaldo/builtins_email.go @@ -115,7 +115,6 @@ func __attach(ps *env.ProgramState, arg0 env.Object, arg1 env.Object, arg2 env.O ps.FailureFlag = true return MakeArgError(ps, 1, []env.Type{env.NativeType}, "gomail-message//attach") } - } func __addAlternative(ps *env.ProgramState, arg0 env.Object, arg1 env.Object, arg2 env.Object, arg3 env.Object, arg4 env.Object) env.Object { diff --git a/evaldo/builtins_html.go b/evaldo/builtins_html.go index 964f0577..d8c857ba 100644 --- a/evaldo/builtins_html.go +++ b/evaldo/builtins_html.go @@ -53,7 +53,6 @@ type HtmlDialectNode struct { // xwords after another or conditions mean that we dive deeper, like a block { } would be func load_html_Dict(es *env.ProgramState, block env.Block) (env.Dict, *env.Error) { - var key string var condition *HtmlNavigCondition var keys []string // keys @@ -153,7 +152,6 @@ func load_html_Dict(es *env.ProgramState, block env.Block) (env.Dict, *env.Error } func do_html(es *env.ProgramState, reader io.Reader, dmap env.Dict) env.Object { - trace8("**** DO HTML **** ") // fmt.Println(dmap) @@ -181,9 +179,7 @@ func do_html(es *env.ProgramState, reader io.Reader, dmap env.Dict) env.Object { myloop: for { - //fmt.Println(dmap) - // Read tokens from the XML document in a stream. rawtoken := decoder.Next() // Inspect the type of the token just read. @@ -315,7 +311,7 @@ myloop: // fmt.Println("IN BLOCK") ser := es.Ser // TODO -- make helper function that "does" a block es.Ser = node.Code.Series - EvalBlockInj(es, env.String{string(tok.Data)}, true) + EvalBlockInj(es, env.NewString(tok.Data), true) if es.ErrorFlag { return es.Res } @@ -359,10 +355,8 @@ myloop: m := len(tags) - 1 // Top element curtag = tags[m] tags = tags[:m] // Pop - // fmt.Println(stack) // fmt.Println(tags) - } case html.ErrorToken: break myloop @@ -426,14 +420,14 @@ var Builtins_html = map[string]*env.Builtin{ switch n := arg1.(type) { case env.Integer: if int(n.Value) < len(tok.Attr) { - return env.String{tok.Attr[int(n.Value)].Val} + return env.NewString(tok.Attr[int(n.Value)].Val) } else { return env.Void{} } case env.Word: for _, a := range tok.Attr { if a.Key == ps.Idx.GetWord(n.Index) { - return env.String{a.Val} + return env.NewString(a.Val) } } return env.Void{} @@ -457,9 +451,9 @@ var Builtins_html = map[string]*env.Builtin{ case env.Native: switch tok := tok1.Value.(type) { case html.Token: - return env.String{tok.Data} + return env.NewString(tok.Data) default: - return MakeBuiltinError(ps, "Not xml-strat element.", "rye-html-start//name?") + return MakeBuiltinError(ps, "Not xml-start element.", "rye-html-start//name?") } default: return MakeArgError(ps, 1, []env.Type{env.NativeType}, "rye-html-start//name?") @@ -476,7 +470,7 @@ var Builtins_html = map[string]*env.Builtin{ case xml.StartElement: return env.String{obj1.Name.Local} default: - return env.NewError("Not xml-strat element") + return env.NewError("Not xml-start element") } default: return env.NewError("first argument should be native") diff --git a/evaldo/builtins_http.go b/evaldo/builtins_http.go index 5c2a3763..5d237761 100755 --- a/evaldo/builtins_http.go +++ b/evaldo/builtins_http.go @@ -299,7 +299,7 @@ var Builtins_http = map[string]*env.Builtin{ return MakeBuiltinError(ps, "Error in reading client data.", "Go-server-websocket//read") } // fmt.Fprintf(path.Value.(http.ResponseWriter), handler.Value) - return env.String{string(msg)} + return env.NewString(string(msg)) default: ps.FailureFlag = true return MakeArgError(ps, 1, []env.Type{env.NativeType}, "Go-server-websocket//read") @@ -371,7 +371,7 @@ var Builtins_http = map[string]*env.Builtin{ return MakeBuiltinError(ps, "Key is missing.", "Go-server-request//query?") } //return env.NewError("XOSADOSADOA SDAS DO" + key.Value) - return env.String{vals[0]} + return env.NewString(vals[0]) default: ps.FailureFlag = true return MakeArgError(ps, 2, []env.Type{env.StringType}, "Go-server-request//query?") @@ -405,7 +405,7 @@ var Builtins_http = map[string]*env.Builtin{ switch req := arg0.(type) { case env.Native: val := req.Value.(*url.URL).Path - return env.String{val} + return env.NewString(val) default: ps.FailureFlag = true return MakeArgError(ps, 1, []env.Type{env.NativeType}, "Go-server-url//path?") @@ -426,7 +426,7 @@ var Builtins_http = map[string]*env.Builtin{ ps.FailureFlag = true return MakeBuiltinError(ps, "Cookie key is missing.", "Go-server-request//cookie-val?") } - return env.String{cookie.Value} + return env.NewString(cookie.Value) default: ps.FailureFlag = true return MakeArgError(ps, 2, []env.Type{env.StringType}, "Go-server-request//cookie-val?") @@ -456,7 +456,7 @@ var Builtins_http = map[string]*env.Builtin{ ps.FailureFlag = true return MakeBuiltinError(ps, "Value is missing.", "Go-server-request//form?") } - return env.String{val} + return env.NewString(val) default: ps.FailureFlag = true return MakeArgError(ps, 2, []env.Type{env.StringType}, "Go-server-request//form?") @@ -550,7 +550,7 @@ var Builtins_http = map[string]*env.Builtin{ switch req := arg0.(type) { case env.Native: r := req.Value.(*multipart.FileHeader) - return env.String{r.Filename} + return env.NewString(r.Filename) default: ps.FailureFlag = true return MakeArgError(ps, 1, []env.Type{env.NativeType}, "rye-multipart-header//filename?") diff --git a/evaldo/builtins_mail.go b/evaldo/builtins_mail.go index c29fdc62..857db3f7 100644 --- a/evaldo/builtins_mail.go +++ b/evaldo/builtins_mail.go @@ -36,7 +36,7 @@ var Builtins_mail = map[string]*env.Builtin{ Fn: func(ps *env.ProgramState, arg0 env.Object, arg1 env.Object, arg2 env.Object, arg3 env.Object, arg4 env.Object) env.Object { switch email := arg0.(type) { case env.Native: - return env.String{email.Value.(parsemail.Email).Subject} + return env.NewString(email.Value.(parsemail.Email).Subject) default: return MakeArgError(ps, 1, []env.Type{env.NativeType}, "parsed-email//subject?") } @@ -86,7 +86,7 @@ var Builtins_mail = map[string]*env.Builtin{ Fn: func(ps *env.ProgramState, arg0 env.Object, arg1 env.Object, arg2 env.Object, arg3 env.Object, arg4 env.Object) env.Object { switch email := arg0.(type) { case env.Native: - return env.String{email.Value.(parsemail.Email).MessageID} + return env.NewString(email.Value.(parsemail.Email).MessageID) default: return MakeArgError(ps, 1, []env.Type{env.NativeType}, "parsed-email//message-id?") } @@ -99,7 +99,7 @@ var Builtins_mail = map[string]*env.Builtin{ Fn: func(ps *env.ProgramState, arg0 env.Object, arg1 env.Object, arg2 env.Object, arg3 env.Object, arg4 env.Object) env.Object { switch email := arg0.(type) { case env.Native: - return env.String{email.Value.(parsemail.Email).HTMLBody} + return env.NewString(email.Value.(parsemail.Email).HTMLBody) default: return MakeArgError(ps, 1, []env.Type{env.NativeType}, "parsed-email//html-body?") } @@ -112,7 +112,7 @@ var Builtins_mail = map[string]*env.Builtin{ Fn: func(ps *env.ProgramState, arg0 env.Object, arg1 env.Object, arg2 env.Object, arg3 env.Object, arg4 env.Object) env.Object { switch email := arg0.(type) { case env.Native: - return env.String{email.Value.(parsemail.Email).TextBody} + return env.NewString(email.Value.(parsemail.Email).TextBody) default: return MakeArgError(ps, 1, []env.Type{env.NativeType}, "parsed-email//text-body?") } diff --git a/evaldo/builtins_mysql.go b/evaldo/builtins_mysql.go index f9329c18..5a9eda75 100755 --- a/evaldo/builtins_mysql.go +++ b/evaldo/builtins_mysql.go @@ -105,7 +105,7 @@ var Builtins_mysql = map[string]*env.Builtin{ } else { num, _ := res.RowsAffected() if num > 0 { - return env.Integer{1} + return env.NewInteger(1) } else { ps.FailureFlag = true return MakeBuiltinError(ps, "No rows affected.", "Rye-mysql//exec") diff --git a/evaldo/builtins_psql.go b/evaldo/builtins_psql.go index 94b2f242..01ba42b8 100755 --- a/evaldo/builtins_psql.go +++ b/evaldo/builtins_psql.go @@ -72,7 +72,7 @@ var Builtins_psql = map[string]*env.Builtin{ } else { num, _ := res.RowsAffected() if num > 0 { - return env.Integer{1} + return env.NewInteger(1) } else { ps.FailureFlag = true return MakeBuiltinError(ps, "No rows affected.", "Rye-psql//exec") diff --git a/evaldo/builtins_psutil.go b/evaldo/builtins_psutil.go index 6577d58a..ce937b24 100644 --- a/evaldo/builtins_psutil.go +++ b/evaldo/builtins_psutil.go @@ -1,5 +1,5 @@ -//go:build !no_devops -// +build !no_devops +//go:build add_psutil +// +build add_psutil package evaldo diff --git a/evaldo/builtins_psutil_not.go b/evaldo/builtins_psutil_not.go index 451bc0e2..e5b7d292 100644 --- a/evaldo/builtins_psutil_not.go +++ b/evaldo/builtins_psutil_not.go @@ -1,5 +1,5 @@ -//go:build no_devops -// +build no_devops +//go:build !add_psutil +// +build !add_psutil package evaldo diff --git a/evaldo/builtins_smtpd.go b/evaldo/builtins_smtpd.go index b5c14edb..0a893565 100755 --- a/evaldo/builtins_smtpd.go +++ b/evaldo/builtins_smtpd.go @@ -5,6 +5,7 @@ package evaldo import ( "bytes" + "fmt" "net" "github.com/refaktor/rye/env" @@ -33,24 +34,30 @@ var Builtins_smtpd = map[string]*env.Builtin{ case env.Function: switch name := arg2.(type) { case env.String: - smtpd.ListenAndServe(server.Value.(env.String).Value, + err := smtpd.ListenAndServe(server.Value.(env.String).Value, func(origin net.Addr, from string, to []string, data []byte) error { ps.FailureFlag = false ps.ErrorFlag = false ps.ReturnFlag = false psTemp := env.ProgramState{} - copier.Copy(&psTemp, &ps) + err := copier.Copy(&psTemp, &ps) + if err != nil { + fmt.Println(err.Error()) // TODO + } // msg, _ := mail.ReadMessage(bytes.NewReader(data)) lstTo := make([]any, len(to)) for i, v := range to { lstTo[i] = v } - CallFunctionArgs4(handler, ps, *env.NewNative(ps.Idx, bytes.NewReader(data), "rye-reader"), env.String{from}, *env.NewList(lstTo), *env.NewNative(ps.Idx, origin, "new-addr"), nil) + CallFunctionArgs4(handler, ps, *env.NewNative(ps.Idx, bytes.NewReader(data), "rye-reader"), env.NewString(from), *env.NewList(lstTo), *env.NewNative(ps.Idx, origin, "new-addr"), nil) //msg, _ := mail.ReadMessage(bytes.NewReader(data)) //subject := msg.Header.Get("Subject") //log.Printf("Received mail from %s for %s with subject %s", from, to[0], subject) return nil }, name.Value, "") + if err != nil { + return makeError(ps, err.Error()) + } return arg0 default: return MakeArgError(ps, 3, []env.Type{env.StringType}, "smtpd//serve") diff --git a/evaldo/builtins_sqlite.go b/evaldo/builtins_sqlite.go index 04d08398..bbfbad20 100755 --- a/evaldo/builtins_sqlite.go +++ b/evaldo/builtins_sqlite.go @@ -29,7 +29,7 @@ func SQL_EvalBlock(es *env.ProgramState, mode int, values []any) (*env.ProgramSt //fmt.Println(bu.String()) } //fmt.Println(bu.String()) - es.Res = env.String{bu.String()} + es.Res = env.NewString(bu.String()) return es, values } @@ -85,7 +85,7 @@ func SQL_EvalExpression(es *env.ProgramState, vals []any, mode int) (*env.Progra fmt.Println("OTHER SQL NODE") return es, "Error 123112431", vals } - return es, "ERROR", vals + // return es, "ERROR", vals } var Builtins_sqlite = map[string]*env.Builtin{ @@ -113,7 +113,7 @@ var Builtins_sqlite = map[string]*env.Builtin{ Fn: func(ps *env.ProgramState, arg0 env.Object, arg1 env.Object, arg2 env.Object, arg3 env.Object, arg4 env.Object) env.Object { switch str := arg0.(type) { case env.Spreadsheet: - return env.String{str.ToHtml()} + return env.NewString(str.ToHtml()) default: return MakeArgError(ps, 1, []env.Type{env.SpreadsheetType}, "htmlize") } diff --git a/evaldo/builtins_ssh.go b/evaldo/builtins_ssh.go index 123caadb..60bfba36 100755 --- a/evaldo/builtins_ssh.go +++ b/evaldo/builtins_ssh.go @@ -1,5 +1,5 @@ -//go:build !no_ssh -// +build !no_ssh +//go:build add_ssh +// +build add_ssh package evaldo diff --git a/evaldo/builtins_ssh_not.go b/evaldo/builtins_ssh_not.go index c7c0a001..4966df3b 100755 --- a/evaldo/builtins_ssh_not.go +++ b/evaldo/builtins_ssh_not.go @@ -1,5 +1,5 @@ -//go:build no_ssh -// +build no_ssh +//go:build !add_ssh +// +build !add_ssh package evaldo diff --git a/evaldo/builtins_sxml.go b/evaldo/builtins_sxml.go index 7e02dc69..7de13e8e 100644 --- a/evaldo/builtins_sxml.go +++ b/evaldo/builtins_sxml.go @@ -16,7 +16,6 @@ import ( // { { _ [ .print ] { _ [ .print2 ";" ] } } func load_saxml_Dict(ps *env.ProgramState, block env.Block) (env.Dict, *env.Error) { - var keys []string data := make(map[string]any) @@ -74,7 +73,6 @@ func load_saxml_Dict(ps *env.ProgramState, block env.Block) (env.Dict, *env.Erro } func do_sxml(ps *env.ProgramState, reader io.Reader, rmap env.Dict) env.Object { - var stack []env.Dict var tags []string var curtag string @@ -131,7 +129,7 @@ func do_sxml(ps *env.ProgramState, reader io.Reader, rmap env.Dict) env.Object { case env.Block: ser := ps.Ser // TODO -- make helper function that "does" a block ps.Ser = obj.Series - EvalBlockInj(ps, env.String{string(se.Copy())}, true) + EvalBlockInj(ps, env.NewString(string(se.Copy())), true) ps.Ser = ser } } @@ -203,7 +201,7 @@ var Builtins_sxml = map[string]*env.Builtin{ switch n := arg1.(type) { case env.Integer: if int(n.Value) < len(obj1.Attr) { - return env.String{obj1.Attr[int(n.Value)].Value} + return env.NewString(obj1.Attr[int(n.Value)].Value) } else { return env.Void{} } @@ -211,7 +209,7 @@ var Builtins_sxml = map[string]*env.Builtin{ return MakeArgError(ps, 2, []env.Type{env.IntegerType}, "rye-sxml-start//get-attr") } default: - return MakeBuiltinError(ps, "Not xml-strat element.", "rye-sxml-start//get-attr") + return MakeBuiltinError(ps, "Not xml-start element.", "rye-sxml-start//get-attr") } default: return MakeArgError(ps, 1, []env.Type{env.NativeType}, "rye-sxml-start//get-attr") @@ -226,9 +224,9 @@ var Builtins_sxml = map[string]*env.Builtin{ case env.Native: switch obj1 := obj.Value.(type) { case xml.StartElement: - return env.String{obj1.Name.Local} + return env.NewString(obj1.Name.Local) default: - return MakeBuiltinError(ps, "Not xml-strat element.", "rye-sxml-start//name?") + return MakeBuiltinError(ps, "Not xml-start element.", "rye-sxml-start//name?") } default: return MakeArgError(ps, 1, []env.Type{env.NativeType}, "rye-sxml-start//name?") diff --git a/evaldo/builtins_telegrambot.go b/evaldo/builtins_telegrambot.go index 47627c17..76d9f6aa 100755 --- a/evaldo/builtins_telegrambot.go +++ b/evaldo/builtins_telegrambot.go @@ -98,7 +98,7 @@ var Builtins_telegrambot = map[string]*env.Builtin{ ps.Ser.Reset() } ps.Ser = ser - return env.Integer{1} + return env.NewInteger(1) default: return MakeArgError(ps, 2, []env.Type{env.BlockType}, "telegram-bot//on-update") } @@ -116,7 +116,10 @@ var Builtins_telegrambot = map[string]*env.Builtin{ case env.Native: switch bot := arg1.(type) { case env.Native: - bot.Value.(*tgm.BotAPI).Send(msg.Value.(tgm.MessageConfig)) + _, err := bot.Value.(*tgm.BotAPI).Send(msg.Value.(tgm.MessageConfig)) + if err != nil { + return makeError(ps, err.Error()) + } return arg0 default: return MakeArgError(ps, 2, []env.Type{env.NativeType}, "telegram-message//send")