forked from kujtimiihoxha/kit
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic: illegal line number (line numbering starts at 1) #7
Comments
@kaisawind Hi, I can not reproduce the problem ,could you show some details:
|
# go version
go version go1.14.5 linux/amd64
# go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/pana/.cache/go-build"
GOENV="/home/pana/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY="dev.yunxing.tech,github.com/kaisawind"
GONOSUMDB="dev.yunxing.tech,github.com/kaisawind"
GOOS="linux"
GOPATH="/home/pana/go"
GOPRIVATE="dev.yunxing.tech,github.com/kaisawind"
GOPROXY="https://goproxy.io,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build973303776=/tmp/go-build -gno-record-gcc-switches"
git clone https://github.com/GrantZheng/kit.git
cd kit
go install
kit n s -b /home/pana/go/src/github.com/kaisawind/iotx -m github.com/kaisawind/iotx/device
# change service file(Add ping api)
kit g s device # ok
kit g s device --dmw # error happend
kit g s device -t grpc # ok
kit g c device # ok
package service
import "context"
// DeviceService describes the service.
type DeviceService interface {
// Add your methods here
Ping(ctx context.Context, s string) (rs string, err error)
}
type basicDeviceService struct{}
func (b *basicDeviceService) Ping(ctx context.Context, s string) (rs string, err error) {
// TODO implement the business logic of Ping
return rs, err
}
// NewBasicDeviceService returns a naive, stateless implementation of DeviceService.
func NewBasicDeviceService() DeviceService {
return &basicDeviceService{}
}
// New returns a DeviceService with all of the expected middleware wired in.
func New(middleware []Middleware) DeviceService {
var svc DeviceService = NewBasicDeviceService()
for _, m := range middleware {
svc = m(svc)
}
return svc
} |
Thank you for providing me information. I can reproduce the case, and you could use it without -b flag first. I will fix it as soon as possible. :) |
poppyred
pushed a commit
to poppyred/kit
that referenced
this issue
Feb 24, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: