ebiten icon indicating copy to clipboard operation
ebiten copied to clipboard

examples: rename `examples` to `example`

Open hajimehoshi opened this issue 1 year ago • 3 comments

Operating System

  • [ ] Windows
  • [ ] macOS
  • [ ] Linux
  • [ ] FreeBSD
  • [ ] OpenBSD
  • [ ] Android
  • [ ] iOS
  • [ ] Nintendo Switch
  • [ ] Xbox
  • [ ] Web Browsers

What feature would you like to be added?

I am not 100% sure, but this seems more conventional

  • https://pkg.go.dev/golang.org/x/mobile

As this is a breaking change, I'd do this in v3.

Why is this needed?

No response

hajimehoshi avatar Sep 21 '23 13:09 hajimehoshi

To be honest, the only consensus for big projects seems to be externalizing the examples, rather than using example or examples. For each repository using example, you can find another using examples. Here are some... ehem... examples:

  • https://github.com/fyne-io/examples/
  • https://github.com/gin-gonic/gin
  • https://github.com/go-kit/kit
  • https://github.com/smartystreets/goconvey
  • https://github.com/prometheus/client_golang

Even some well-known members of the Golang community use examples instead of example:

  • https://github.com/klauspost/reedsolomon
  • https://github.com/davecheney/gcvis
  • https://github.com/eliben/gosax

The highly criticized https://github.com/golang-standards/project-layout also uses examples.

Perhaps you are right that example is slightly more "official", but it's unclear and it seems like an unnecessary change in practice. Externalizing examples directly on ebitengine/examples may be more pertinent in the future.

tinne26 avatar Sep 25 '23 12:09 tinne26

Even some well-known members of the Golang community use examples instead of example:

Huh, interesting

The highly criticized https://github.com/golang-standards/project-layout also uses examples.

This might indicate we should go in the opposite direction 😁

Perhaps you are right that example is slightly more "official", but it's unclear and it seems like an unnecessary change in practice. Externalizing examples directly on ebitengine/examples may be more pertinent in the future.

I didn't say in this issue, but I plan to move github.com/hajimehoshi/ebiten/v2 to github.com/ebitengine/??/v3, so I thought this is a good chance to change the name.

hajimehoshi avatar Sep 25 '23 12:09 hajimehoshi

Another example's example: https://github.com/go-gl/example

hajimehoshi avatar Oct 10 '23 04:10 hajimehoshi