Social Network in 30 days : Day 8 – Day 10


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/bateeqjg/public_html/news/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/bateeqjg/public_html/news/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/bateeqjg/public_html/news/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Warning: Undefined array key "layout" in /home/bateeqjg/public_html/news/wp-content/plugins/wp-about-author/wp-about-author.php on line 94

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.
Example:
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.

// Example code for Chapter 2.3 from "Build Web Application with Golang"
// Purpose: Creating a basic function


to this.

// Example code for Chapter 2.3 from "Build Web Application with Golang".
// Purpose: Creating a basic function

Larry Battle

Larry Battle

I love to program, and discover new tech. Check out my <a href="http://stackoverflow.com/users/527776/larry-battle">stackoverflow</a> and <a href="https://github.com/LarryBattle">github</a> accounts.

More Posts - Website

Follow Me:Add me on XAdd me on LinkedInAdd me on YouTube