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:
23
openapi_codegen_postopenapiof.go
Normal file
23
openapi_codegen_postopenapiof.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user