From 664cf78182c500849249fe7903397d74905addfd Mon Sep 17 00:00:00 2001 From: John Roesler Date: Sun, 29 Oct 2023 21:07:02 -0500 Subject: [PATCH] fix example test --- example_test.go | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/example_test.go b/example_test.go index be2b565c..cec5c336 100644 --- a/example_test.go +++ b/example_test.go @@ -1,7 +1,6 @@ package gocron_test import ( - "context" "fmt" "sync" "time" @@ -389,20 +388,20 @@ func ExampleWithClock() { // one, 2 } -var _ Elector = (*myElector)(nil) - -type myElector struct{} - -func (m myElector) IsLeader(_ context.Context) error { - return nil -} - func ExampleWithDistributedElector() { - elector := myElector{} - - _, _ = NewScheduler( - WithDistributedElector(elector), - ) + //var _ Elector = (*myElector)(nil) + // + //type myElector struct{} + // + //func (m myElector) IsLeader(_ context.Context) error { + // return nil + //} + // + //elector := myElector{} + // + //_, _ = NewScheduler( + // WithDistributedElector(elector), + //) } func ExampleWithEventListeners() {