Skip to content

Commit

Permalink
expose Start
Browse files Browse the repository at this point in the history
  • Loading branch information
emicklei committed Jun 21, 2024
1 parent 348bea2 commit ea626e3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion service.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,16 @@ type service struct {
indexTemplate *template.Template
}

func NewService(labelValuePairs ...any) *service {
type Service interface {
// Start accepts 0 or 1 Options
Start(opts ...Options)
}

func NewService(labelValuePairs ...any) Service {
return &service{explorer: newExplorerOnAll(labelValuePairs...)}
}

// Start accepts 0 or 1 Options, implements Service
func (s *service) Start(opts ...Options) {
if len(opts) > 0 {
s.explorer.options = &opts[0]
Expand Down

0 comments on commit ea626e3

Please sign in to comment.