get rid of interface{} since we now require Go 1.18

This commit is contained in:
Kovid Goyal
2022-09-21 08:11:46 +05:30
parent a44c89504b
commit 2cacd7a64a
15 changed files with 37 additions and 37 deletions

View File

@@ -11,11 +11,11 @@ type Context struct {
AllowEscapeCodes bool
}
func (self *Context) SprintFunc(spec string) func(args ...interface{}) string {
func (self *Context) SprintFunc(spec string) func(args ...any) string {
p := prefix_for_spec(spec)
s := suffix_for_spec(spec)
return func(args ...interface{}) string {
return func(args ...any) string {
body := fmt.Sprint(args...)
if !self.AllowEscapeCodes {
return body

View File

@@ -3,16 +3,16 @@
package utils
type RemoteControlCmd struct {
Cmd string `json:"cmd"`
Version [3]int `json:"version"`
NoResponse bool `json:"no_response,omitempty"`
Timestamp int64 `json:"timestamp,omitempty"`
Password string `json:"password,omitempty"`
Async string `json:"async,omitempty"`
CancelAsync bool `json:"cancel_async,omitempty"`
Stream bool `json:"stream,omitempty"`
StreamId string `json:"stream_id,omitempty"`
Payload interface{} `json:"payload,omitempty"`
Cmd string `json:"cmd"`
Version [3]int `json:"version"`
NoResponse bool `json:"no_response,omitempty"`
Timestamp int64 `json:"timestamp,omitempty"`
Password string `json:"password,omitempty"`
Async string `json:"async,omitempty"`
CancelAsync bool `json:"cancel_async,omitempty"`
Stream bool `json:"stream,omitempty"`
StreamId string `json:"stream_id,omitempty"`
Payload any `json:"payload,omitempty"`
}
type EncryptedRemoteControlCmd struct {