celestiaorg / go-square

A library for encoding blobs into a 2D square of evenly sized chunks designed for sampling and reconstruction
Apache License 2.0
13 stars 16 forks source link

chore!: merge blob pkg into share pkg #82

Closed cmwaters closed 2 months ago

cmwaters commented 2 months ago

Closes: https://github.com/celestiaorg/go-square/issues/79

The decision comes about because it's more intuitive that blobs reside in the share package which is responsible for converting blobs into shares and vice versa.

cmwaters commented 2 months ago

Just one question, why is the package called shares and not share? all the other packages are in singular except for that one

I would agree. In fact I think it's common practice to use singular form (ref: https://go.dev/blog/package-names). I can change it to share. I was also thinking that something like split might be a better description and not lead to problems like share := share.NewShare(); share.Version()

rootulp commented 2 months ago

Just one question, why is the package called shares and not share?

+1 I think it was accidentally called shares a long time ago (https://github.com/celestiaorg/celestia-app/pull/627) and we just haven't made the breaking change to rename it to singular share.