Social Network in 30 days : Day 8 – Day 10

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

I love to program, and discover new tech. Check out my stackoverflow and github accounts.

Share
Published by
Larry Battle

Recent Posts

What really is Data Science? Told by a Data Scientist

What REALLY is Data Science? Told by a Data Scientist - By Joma Tech

7 years ago

Video: How Water Towers Work

How Water Towers Work - Practical Engineering

7 years ago

Dev Tip: Simple tips to improve code reviews

Writing perfect code is a challenging process. That's where code reviews come in to help…

7 years ago

Video: How AI will change the 3d industry

"The Next Leap: How A.I. will change the 3D industry - Andrew Price - Blender"

7 years ago

Best Software Presentation for 2018

"Captain Disillusion: World's Greatest Blenderer - Live at the Blender Conference 2018 - CaptainDisillusion"

7 years ago

Dev Video: A Few Linux Shell Tips

My 5 Favorite Linux Shell Tricks for SPEEEEEED (and efficiency) - By tutoriaLinux > What's…

7 years ago