GMIT Software Development 3rd year.
Module: Data Representation.
GoLang Problem sheet.
This problem set is to learn the fundamentals of creating a web application in Go.
- Open Git Bash.
- Change the current working directory to the location where you want the cloned directory to be made.
- Type 'git clone', and then paste the URL
https://github.com/kentkim84/GoLangWebAppProject.git
orgit@github.com:kentkim84/GoLangWebAppProject.git
git clone https://github.com/kentkim84/GoLangWebAppProject.git
// Version 0.2 using C standards
1.1. Use Pascal casing for class and structs
type Rectangle struct {
Name string
Width, Height float64
}
func (r Rectangle) Area() float64 {
return r.Width * r.Height
}
1.2. Use camel casing for local variable names and function parameters
func SomeMethod(someParameter const int)
{
someNumber int
}
1.3. Use verb-object pairs for method names a. Use pascal casing for public methods
public:
func DoSomething()
b. Use camel casing for other methods
private:
func doSomething()
1.4. Put constant variables after import
import (
"fmt"
)
const CONSTANT_NUMBER int = 100
This examples are from
This coding standard is followed by