clipboard: suggestion: making `Write` blocking instead of returning a channel

Thank you for such a great library!

The current Write returns a channel

func Write(t Format, buf []byte) <-chan struct{}

but an example in the comments doesn’t use this channel. Is this intended? So I was a little confused whether the channel should be used or not.

In order to avoid confusion, wouldn’t it better to change Write blocking and let users decide whether they wait for returning or not? They could use their own channels if they wanted to use Write as non-blocking. This suggestion would simplify the API and consistent with Read, which is already blocking.

What do you think? Thanks,

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 30 (14 by maintainers)

Most upvoted comments

Confirmed. Then?

OK, you are correct, then?