akif999 / drivers

TinyGo drivers for sensors and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.
https://tinygo.org
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

Io reader writer #4

Closed akif999 closed 1 year ago

akif999 commented 1 year ago

以下の変更を実施しました。

sago35 commented 1 year ago

間違えてた。 io.Reader はこっちの形で実装して欲しい。 https://github.com/tinygo-org/tinygo/blob/v0.26.0/src/os/file_other.go#L41-L61

len == 0 を返さないほうが良い。 https://pkg.go.dev/io#Reader

Implementations of Read are discouraged from returning a zero byte count with a nil error, except when len(p) == 0. Callers should treat a return of 0 and nil as indicating that nothing happened; in particular it does not indicate EOF. 
sago35 commented 1 year ago

👍 したレビューコメントは Resolve conversation しておくとよさそう。

#自分には権限がないので、そのボタンがない

akif999 commented 1 year ago

↑ Collaborators を設定しました。