New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto Doc #38
Auto Doc #38
Conversation
docgenerator/generator.go
Outdated
func (d docMap) toMap() map[string]interface{} { | ||
var m map[string]interface{} | ||
bts, _ := json.Marshal(d) | ||
json.Unmarshal(bts, &m) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error return value of json.Unmarshal
is not checked
docgenerator/generator.go
Outdated
return name | ||
} | ||
|
||
return string(append([]byte{strings.ToLower(name)[0]}, name[1:len(name)]...)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should omit second index in slice, s[a:len(s)] is identical to s[a:]
5b6a0dd
to
4500dac
Compare
Pull Request Test Coverage Report for Build 390
💛 - Coveralls |
3f486de
to
245fc88
Compare
LGTM |
Nice! I'll merge this :) |
very well done @henrod, I think this will be valuable for pitaya admin @cscatolini |
@felipejfc Yes! :) we'll integrate it as soon as we have the project up and running |
docgenerator creates a doc with the following format:
The game can use pitaya.Documentation() function to get this map[string]interface{} and return in any format: html in http route, a new remote, etc.