Comments (3)
Taking a better look at other projects with the same problem, stretchr/testify created a go file just to help documentation:
https://github.com/stretchr/testify/blob/master/doc.go
I'll go with this approach for now. Couldn't this project propose something official?
from project-layout.
GoDoc might not have a page for your root directory, but it should have pages for your sub-directories where you have Go code. I've seen it with other projects that don't have any go files in the root directory.
It's ok to have a manually created doc.go
in the root directory. doc.go
files are pretty common. You can also do something similar to what they do for Go itself where they dump the application help info to the alldocs.go
file ( here's their shell script: https://github.com/golang/go/blob/master/src/cmd/go/mkalldocs.sh )
from project-layout.
btw I encountered the same problem, and filed an issue: golang/gddo#618 -- also came up with the same workaround of creating a doc.go file at root level..
from project-layout.
Related Issues (20)
- singular? plural? HOT 3
- Duplicated simplified-chinese translated README HOT 1
- Guidance could be provided on where to put tests in library directories HOT 1
- Driver location
- Why there is no link to the Italian translations? HOT 1
- The release badge is broken
- Minio no longer uses /pkg in the project layout HOT 2
- How can I debug projects with this structure in VSCODE? HOT 2
- Question: best place to put "local environment" startup scripts ? (not Helm) HOT 1
- Why are some directories plural and others singular? Can it be unified?
- /api/proto to store protobuf definitions HOT 1
- what is Hacker license? HOT 1
- Regarding the description of the deprecated tool golint HOT 3
- Better to use the Go team's examples of project layout HOT 1
- Official layout documentation HOT 3
- Should auxiliary code generators be in `cmd/` or in `tools/`? HOT 2
- what's the meaning of these three question after chinese translations ?
- "Discussions" tab HOT 1
- How to run this project ? HOT 1
- Where should `/dao` be placed? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from project-layout.