package logic import ( "context" "demo/internal/svc" "demo/internal/types" "github.com/zeromicro/go-zero/core/logx" ) type PingLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewPingLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PingLogic { return &PingLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *PingLogic) Ping() (resp *types.Response, err error) { // todo: add your logic here and delete this line return &types.Response{ Message: "Pong", }, nil }