diff options
author | Özgür Kesim <oec@codeblau.de> | 2024-11-10 14:21:03 +0100 |
---|---|---|
committer | Özgür Kesim <oec@codeblau.de> | 2024-11-10 14:21:03 +0100 |
commit | 6c572f6037137c677c2c8c5143723a777a8747c5 (patch) | |
tree | bb9a981101487e7f887c5b32a81a958c8ce12a66 | |
parent | f98e43234a3b7a9823ac9b9e68c7c595c10ebe7d (diff) |
make message a type; add test
-rw-r--r-- | auction.go | 9 | ||||
-rw-r--r-- | auction_test.go | 8 |
2 files changed, 14 insertions, 3 deletions
@@ -73,10 +73,12 @@ func (d *Description) validate() error { return nil } +type Message []byte + type Auction interface { Start() error Cancel() error - Message(msg []byte) error + Message(msg Message) error } type Result struct { @@ -113,10 +115,11 @@ func (a *auction) Cancel() error { return errors.New("Cancel not implemented") } -// Message is called by the Bidder or Visitor + +// Message is called by the Bidder or Observer // whenever a message came in for the auction via the dashboard // or other means of communication. -func (a *auction) Message(msg []byte) error { +func (a *auction) Message(msg Message) error { return fmt.Errorf("Auction.Received not implemented") } diff --git a/auction_test.go b/auction_test.go new file mode 100644 index 0000000..93d9830 --- /dev/null +++ b/auction_test.go @@ -0,0 +1,8 @@ +package seal + +import "testing" + +func TestAuction(t *testing.T) { + +} + |