1
0
mirror of https://github.com/fumiama/NanoBot.git synced 2026-06-05 18:50:24 +08:00

add: postopenapiof codegen

This commit is contained in:
源文雨
2023-10-10 14:34:36 +09:00
parent 3dbb8d7b34
commit f04743c7a5
5 changed files with 134 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
// Code generated by codegen/postopenapiof. DO NOT EDIT.
package nano
import (
"io"
"unsafe"
"github.com/pkg/errors"
)
func (bot *Bot) postOpenAPIofChannel(ep string, body io.Reader) (*Channel, error) {
resp := &struct {
CodeMessageBase
Channel
}{}
err := bot.PostOpenAPI(ep, resp, body)
if err != nil {
err = errors.Wrap(err, getCallerFuncName())
return nil, err
}
return (*Channel)(unsafe.Add(unsafe.Pointer(resp), unsafe.Sizeof(CodeMessageBase{}))), nil
}