fix: nil pointer
This commit is contained in:
23
testdata/main.go
vendored
23
testdata/main.go
vendored
@@ -1,19 +1,26 @@
|
||||
package goast
|
||||
|
||||
import (
|
||||
_ "github.com/stretchr/testify"
|
||||
)
|
||||
import "gitter.top/coco/coco/core"
|
||||
|
||||
var a = 1
|
||||
type ExampleService struct{}
|
||||
|
||||
const d = "world"
|
||||
// IDE: ExampleService implemented main.ExampleServiceImpl interface
|
||||
var _ main.ExampleServiceImpl = (*ExampleService)(nil)
|
||||
|
||||
func hello() {
|
||||
// ExampleCall1 test rpc
|
||||
func (receiver *ExampleService) ExampleCall1(ctx *core.Context, req *main.ExampleMessage1) (resp *main.ReturnType, err error) {
|
||||
resp = new(main.ReturnType)
|
||||
|
||||
// TODO impl...
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
type c int
|
||||
// ExampleCall2
|
||||
func (receiver *ExampleService) ExampleCall2(ctx *core.Context, req *main.ExampleMessage2) (resp *main.ReturnType, err error) {
|
||||
resp = new(main.ReturnType)
|
||||
|
||||
func (cc c) name() {
|
||||
// TODO impl...
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user