Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit deb2682

Browse files
committed
fixes#3
1 parent 72e5f90 commit deb2682

File tree

6 files changed

+65
-4
lines changed

6 files changed

+65
-4
lines changed

‎CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
....

‎Constant.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package main
2+
3+
import "fmt"
4+
5+
const (
6+
RED="red"
7+
BLUE="blue"
8+
)
9+
10+
func main() {
11+
fmt.Println("The color of the car was not",BLUE)
12+
fmt.Println("It Was",RED)
13+
}

‎Function-as-value.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import (
55
)
66

77
func main() {
8-
sum := getSum(10, 20)
8+
sum := add(10, 20)
99
fmt.Println(sum)
1010

1111
}
1212

13-
func getSum(a, b int) int {
13+
func add(a, b int) int {
1414
return (a + b)
1515
}

‎Function-call-by-reference.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ func main() {
88
a = 10
99
b = 12
1010

11-
swap(&a, &b)
11+
swapValue(&a, &b)
1212

1313
fmt.Println("a: ", a, " ,b: ", b)
1414
}
1515

16-
func swap(a, b *uint8) {
16+
func swapValue(a, b *uint8) {
1717
x := *a
1818
*a = *b
1919
*b = x

‎README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,47 @@
11
# go-playground
2+
3+
> A place to explore go
4+
5+
## What is go?
6+
7+
>Go is a general-purpose language designed with systems programming in mind. It was initially developed at Google in the year 2007 by Robert Griesemer, Rob Pike, and Ken Thompson. It is strongly and statically typed, provides inbuilt support for garbage collection, and supports concurrent programming.
8+
9+
# Prerequisites
10+
> - Installed Golang on your local environment.
11+
12+
13+
# Table of Content (The starter)
14+
15+
|Id | Topic | Docs
16+
|---|----------------------------------------------------------------------------------------|--------------------------------------------------|
17+
| 00| [The "Hello World"](https://github.com/utilityCode-Foundation/go-playground/blob/master/HelloWorld.go) | [User Guide]() |
18+
| 01| [Work with variables](https://github.com/utilityCode-Foundation/go-playground/blob/master/Variables.go) | [User Guide]() |
19+
| 02| [Work with constant](https://github.com/utilityCode-Foundation/go-playground/blob/master/Constant.go) | [User Guide]() |
20+
| 03| [Work with decision making](https://github.com/utilityCode-Foundation/go-playground/blob/master/DecisionMaking.go) | [User Guide]() |
21+
| 04| [Work with loop](https://github.com/utilityCode-Foundation/go-playground/blob/master/Loop.go) | [User Guide]() |
22+
| 05| [Work with function (call by value)](https://github.com/utilityCode-Foundation/go-playground/blob/master/Function-call-by-value.go) | [User Guide]() |
23+
| 06| [Work with function (call by reference)](https://github.com/utilityCode-Foundation/go-playground/blob/master/Function-call-by-reference.go) | [User Guide]() |
24+
| 07| [Work with function (as value)](https://github.com/utilityCode-Foundation/go-playground/blob/master/Function-as-value.go) | [User Guide]() |
25+
| 08| [Work with function (closure)](https://github.com/utilityCode-Foundation/go-playground/blob/master/Function-as-closure.go) | [User Guide]() |
26+
| 09| [Work with array](https://github.com/utilityCode-Foundation/go-playground/blob/master/Array.go) | [User Guide]() |
27+
| 10| [Work with struct](https://github.com/utilityCode-Foundation/go-playground/blob/master/Struct.go) | [User Guide]() |
28+
| 11| [Work with slice](https://github.com/utilityCode-Foundation/go-playground/blob/master/Slice.go) | [User Guide]() |
29+
| 12| [Work with range](https://github.com/utilityCode-Foundation/go-playground/blob/master/Range.go) | [User Guide]() |
30+
| 13| [Work with map](https://github.com/utilityCode-Foundation/go-playground/blob/master/Map.go) | [User Guide]() |
31+
| 14| [Work with recursion](https://github.com/utilityCode-Foundation/go-playground/blob/master/Recursion.go) | [User Guide]() |
32+
| 15| [Work with interface and method overloading](https://github.com/utilityCode-Foundation/go-playground/blob/master/Method-overriding-with-interface.go) | [User Guide]() |
33+
| 16| [Work with error handling](https://github.com/utilityCode-Foundation/go-playground/blob/master/ErrorHandling.go) | [User Guide]() |
34+
35+
# Table of Content (More than starter)
36+
37+
|Id | Topic | Docs
38+
|---|----------------------------------------------------------------------------------------|--------------------------------------------------|
39+
| 01| [Design pattern](https://github.com/utilityCode-Foundation/go-playground/tree/master/design-pattern/README.md) | [User Guide]() |
40+
41+
## Want to contribute ?
42+
43+
We are so excited to have you!
44+
45+
- See [CONTRIBUTING.md](CONTRIBUTING.md) for an overview of our processes
46+
- Look at our
47+
[issues](https://github.com/utilityCode-Foundation/go-playground/issues)

‎design-pattern/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# design-pattern

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /