1
0
mirror of https://github.com/fumiama/NanoBot.git synced 2026-06-05 10:40:24 +08:00
Files
NanoBot/openapi_codegen_postopenapiof.go
2023-10-10 14:34:36 +09:00

24 lines
480 B
Go

// 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
}