mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-07 17:43:53 +02:00
run modernize
This commit is contained in:
@@ -184,7 +184,7 @@ func (self *ResponseData) UnmarshalJSON(data []byte) error {
|
||||
|
||||
type Response struct {
|
||||
Ok bool `json:"ok"`
|
||||
Data ResponseData `json:"data,omitempty"`
|
||||
Data ResponseData `json:"data"`
|
||||
Error string `json:"error,omitempty"`
|
||||
Traceback string `json:"tb,omitempty"`
|
||||
}
|
||||
|
||||
@@ -39,10 +39,7 @@ func parse_send_text(io_data *rc_io_data, args []string) error {
|
||||
}
|
||||
text := strings.Join(args, " ")
|
||||
text_gen := func(io_data *rc_io_data) (bool, error) {
|
||||
limit := len(text)
|
||||
if limit > 2048 {
|
||||
limit = 2048
|
||||
}
|
||||
limit := min(len(text), 2048)
|
||||
set_payload_data(io_data, "base64:"+base64.StdEncoding.EncodeToString(utils.UnsafeStringToBytes(text[:limit])))
|
||||
text = text[limit:]
|
||||
return len(text) == 0, nil
|
||||
|
||||
Reference in New Issue
Block a user