Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ankurrai1/getting_started_go

Its a basic level repo for getting started with go lang and its concepts.
https://github.com/ankurrai1/getting_started_go

concept getting-started go golang golang-examples gopath iota loop panic race-condition routine switch-case

Last synced: about 20 hours ago
JSON representation

Its a basic level repo for getting started with go lang and its concepts.

Awesome Lists containing this project

README

        

# ***Getting Started With GO***

>This folder consists of only basic code without app level implimentation and big logic
which helps to understand the basic syntax of language. Basically we can say that it is Core Go Repo.

### ***Installing Go***
----

* ***[ GO OFFICIAL ](https://golang.org/)***
* ***[ GO OFFICIAL DOWNLOAD PAGE](https://golang.org/dl/)***

>Click on above `GO OFFICIAL` link will take to golang official site.
click on `GO OFFICIAL DOWNLOAD PAGE` for go official download page and select your `Operating System`
and follow installation process after Download.

> it automatically set GOPATH to root, to check run this in terminal or cmd `go env GOPATH`
to know what is current GOPATH

>Go to path folder and create directory with name go `mkdir go` (to create directory)
under this you have to create three other folders `src` ,`pkg` and `bin`.

> after above go to your `src` folder and create your app folder and start coding :)

#### To Run golang file

` go run `

##### ***Other commands are as following***
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
## usage
go [arguments]

## Some Basic Commands
----
```
bug start a bug report
build compile packages and dependencies
clean remove object files and cached files
doc show documentation for package or symbol
env print Go environment information
fix update packages to use new APIs
fmt go fmt (reformat) package sources
generate generate Go files by processing source
get add dependencies to current module and install them
install compile and install packages and dependencies
list list packages or modules
mod module maintenance
run compile and run Go program
test test packages
tool run specified go tool
version print Go version
vet report likely mistakes in packages

```

## For help
-------

`"go help "`

#### First Program

> ***[Hello World](https://github.com/ankurrai1/getting_started_GO/blob/master/hello.go)***

## Some Concepts code links
------

* ***[Variable](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/variable.go)***
* ***[Variable more deeply](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/advance_variable.go)***
* ***[Constants ](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/constants.go)***
* ***[Conditions](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/consditions.go)***
* ***[Switch Case](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/switch.go)***
* ***[Arrays And Slices](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/arrays.go)***
* ***[Array And Loop](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/loop.go)***
* ***[Map](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/json_like_map.go)***
* ***[Struct](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/struct.go)***
* ***[Functions](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/functions.go)***
* ***[Pointer](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/pointer.go)***
* ***[iota Example ](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/iota_example.go)***
* ***[iota Usage ](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/iota_usage.go)***
* ***[Concept of defer](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/defer.go)***
* ***[Defer use case with files](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/defer_with_file.go)***
* ***[Defer use case with net/http](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/defer_with_http.go)***
* ***[Panic](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/panic.go)***
* ***[Panic use case with net/http](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/panic_with_file.go)***
* ***[recovery](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/recovery.go)***
* ***[Method use case](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/method.go)***
* ***[Interface](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/interface.go)***
* ***[Interface with Int](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/interface_int.go)***
* ***[Interface with Buffer](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/interface2.go)***
* ***[Go Routine](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/goroutine.go)***
* ***[Go Routine with WaitGroup](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/wait_groups.go)***
* ***[Go Routine with Race Condition](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/race_problem.go)***
* ***[Channels](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/channel.go)***
* ***[Mutex solution for Race condition ](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/mutex.go)***
* ***[Threads](https://github.com/ankurrai1/getting_started_GO/blob/master/concepts_code/go_thread.go)***

## Some Examples Code Links
----

* ***[Basic Calculator Example](https://github.com/ankurrai1/getting_started_GO/blob/master/example_codes/calculater.go)***
* ***[Sum and Subtraction](https://github.com/ankurrai1/getting_started_GO/blob/master/example_codes/sum_sub.go)***
* ***[Area and Perimeter of Rectangle](https://github.com/ankurrai1/getting_started_GO/blob/master/example_codes/rect.go)***
* ***[Switch Case](https://github.com/ankurrai1/getting_started_GO/blob/master/example_codes/switch.go)***
* ***[Marriage Eligibility Test](https://github.com/ankurrai1/getting_started_GO/blob/master/example_codes/marriage_eligibility_test.go)***
* ***[Print N Num By Using Loop](https://github.com/ankurrai1/getting_started_GO/blob/master/example_codes/loop2.go)***
* ***[Print Table of Any Number ](https://github.com/ankurrai1/getting_started_GO/blob/master/example_codes/table.go)***
* ***[Sum & Average of 10 Numbers](https://github.com/ankurrai1/getting_started_GO/blob/master/example_codes/sum_average.go)***
* ***[Structure Examples](https://github.com/ankurrai1/getting_started_GO/blob/master/example_codes/structure.go)***
* ***[Structure Example 2](https://github.com/ankurrai1/getting_started_GO/blob/master/example_codes/struct2.go)***
* ***[Factorial](https://github.com/ankurrai1/getting_started_GO/blob/master/example_codes/fact.go)***
* ***[To get Reverse of a Number](https://github.com/ankurrai1/getting_started_GO/blob/master/example_codes/reverse.go)***
* ***[To get average of Numbers](https://github.com/ankurrai1/getting_started_GO/blob/master/example_codes/average.go)***
----
>***There is not dependency for this repo and it is opne to everey one just clone and make a copy of it for you***
***There is only one thing required to run each file independently is you must have go install in your local machine***
***Go installation instruction is given in top of this file itself.***