Skip to content

Commit

Permalink
server: remove dead example code
Browse files Browse the repository at this point in the history
  • Loading branch information
creachadair committed Mar 20, 2023
1 parent 3540e6c commit 2c3680d
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions server/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"fmt"
"log"

"github.com/creachadair/jrpc2"
"github.com/creachadair/jrpc2/handler"
"github.com/creachadair/jrpc2/server"
)
Expand All @@ -28,21 +27,3 @@ func ExampleNewLocal() {
// Output:
// Hello, world!
}

// Service is a trivial service for testing purposes.
type Service struct {
done chan struct{}
}

func (Service) Assigner() (jrpc2.Assigner, error) {
fmt.Println("SERVICE STARTED")
return handler.Map{"Hello": handler.New(func(ctx context.Context) error {
fmt.Println("Hello human")
return nil
})}, nil
}

func (s Service) Finish(_ jrpc2.Assigner, stat jrpc2.ServerStatus) {
fmt.Printf("SERVICE FINISHED err=%v\n", stat.Err)
close(s.done)
}

0 comments on commit 2c3680d

Please sign in to comment.