I have two comments about the package organization:
1. The root of the repository should contain the package you expect
people to use the most, in this case, the flickr library. The README and
Travis.CI files can live there too.
2. The repository (especially if you do #1) should not be named *.go, as
it could be mistaken by a tool for a go source file. Recommendation:
flickr-go or just flickr if possible
If you do them both, you can still have the package named "flickr" since
the import name is based on the package declaration not the name of the
directory (which would be impossible to use in code). eg:
// in github.com/masci/flickr-go source files:
package "flickr"
// in importing code:
import "github.com/masci/flickr-go" // package name will be flickr
...
flickr.DoStuff()
The import path has no bearing on the name of the package when imported,
but it's a good idea for it to match, or to be obvious from the import
path. This is also how gopkg.in paths work, as each package there has a
version number, and you use the package name without
it: http://gopkg.in/pipe.v2 (used as pipe).
Hi gophers,
I usually prefer to contribute to open source projects instead of
reinventing wheels but in the need to manage my photos from Flickr,
with the aim to learn the language asap, given a number of existing
projects unmaintained/undocumented/unfinished, I ended up coding my
https://github.com/masci/flickr.go
I started learning Go back in June so any advice or criticism is very
precious, thanks in advance.
--
M.
@maxpippi :: http://dev.pippi.im/
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.