28 lines
394 B
Go
28 lines
394 B
Go
package demo
|
|
|
|
import "context"
|
|
|
|
const DefaultLimit = 10
|
|
|
|
var SharedName = "mercury"
|
|
|
|
type Runner interface {
|
|
Run(context.Context) error
|
|
}
|
|
|
|
type Service struct {
|
|
name string
|
|
}
|
|
|
|
func NewService(name string) *Service {
|
|
return &Service{name: name}
|
|
}
|
|
|
|
func (s *Service) Run(ctx context.Context) error {
|
|
return s.helper(ctx)
|
|
}
|
|
|
|
func (s *Service) helper(ctx context.Context) error {
|
|
return nil
|
|
}
|