I haven’t had time to work on the site, LinksTeach.me, for sometime now. So what I’m going to do is delay development for 3 days to finish up a few other side projects and complete essential training.
I’ll startup backup on monday and plan to release an alpha version on Nov 11, 2013.
Awesome bash script:
find . -name main.go | xargs -L1 sed -ri "1s/^\/\/.*[^\.]$/&\./"`
The command finds all the files with the name main.go within the current directory.
After which, for each file it adds a dot to the end of the first line if it’s a comment and doesn’t need with a period.
Why is this useful?
`godoc` is a tool for creating documentation for Google Go files.
Source code for errors
Documentation for errors
`godoc` will use the first sentence as the description for a package. Since I didn’t end the first line with a period, then the entire comment on multiple lines becomes the description for the package.
So when run the awesome bash command above, it corrects the package comment each main.go like so.
// Example code for Chapter 2.3 from "Build Web Application with Golang" // Purpose: Creating a basic function
// Example code for Chapter 2.3 from "Build Web Application with Golang". // Purpose: Creating a basic function