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 ef552e0

Browse files
authored
Merge pull request #1 from utilityCode-Foundation/master
merge new commits
2 parents 60572f8 + 4c5c04d commit ef552e0

File tree

20 files changed

+390
-9
lines changed

20 files changed

+390
-9
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: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,57 @@
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+
| 00| [Data structure](https://github.com/utilityCode-Foundation/go-playground/tree/master/data-structure) | [User Guide]() |
40+
| 01| [Algorithm](https://github.com/utilityCode-Foundation/go-playground/tree/master/algorithm) | [User Guide]() |
41+
| 02| [Design pattern](https://github.com/utilityCode-Foundation/go-playground/tree/master/design-pattern) | [User Guide]() |
42+
43+
# Table of Content (Work with data storages)
44+
45+
|Id | Topic | Docs
46+
|---|----------------------------------------------------------------------------------------|--------------------------------------------------|
47+
| 00| [Mongo]() | [User Guide]() |
48+
| 01| [MySql]() | [User Guide]() |
49+
| 02| [Neo4j]() | [User Guide]() |
50+
51+
## Want to contribute ?
52+
53+
We are so excited to have you!
54+
55+
- See [CONTRIBUTING.md](CONTRIBUTING.md) for an overview of our processes
56+
- Look at our
57+
[issues](https://github.com/utilityCode-Foundation/go-playground/issues)

‎algorithm/README.md

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

‎data-structure/README.md

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

‎design-pattern/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# design-pattern
2+
3+
> In 1994, four authors Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides published a book titled Design Patterns - Elements of Reusable Object-Oriented Software which initiated the concept of Design Pattern in Software development.
4+
These authors are collectively known as ``` Gang of Four (GOF) ```.
5+
6+
### Design Patterns Category
7+
> There are 23 design patterns which can be classified in three categories:
8+
> Additionally there's some design pattern known as concurrency pattern
9+
10+
11+
|Id | Topic | Docs
12+
|---|----------------------------------------------------------------------------------------|--------------------------------------------------|
13+
| 01| [Creational](https://github.com/utilityCode-Foundation/go-playground/tree/master/design-pattern/creational) | [User Guide]() |
14+
| 02| [Structural]() | [User Guide]() |
15+
| 03| [Behavioral]() | [User Guide]() |
16+
| 04| [Concurrency]() | [User Guide]() |

‎design-pattern/creational/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Creational Design pattern
2+
3+
> Creational design pattern deals with object creation. In general, we used to create object using new keyword which is a pretty hard approach. It gives zero flexibility, if we need to decide object instantiation according to situations. Creational design pattern came to solve this issue.
4+
5+
According to the ```(GOF)``` There are six creational design patterns.
6+
7+
8+
|Id | Topic | Docs
9+
|---|----------------------------------------------------------------------------------------|--------------------------------------------------|
10+
| 01| [Builder](https://github.com/utilityCode-Foundation/go-playground/tree/master/design-pattern/creational/builder-pattern) | [User Guide]() |
11+
| 02| [Factory](https://github.com/utilityCode-Foundation/go-playground/tree/master/design-pattern/creational/factory-pattern) | [User Guide]() |
12+
| 03| [Abstract factory](https://github.com/utilityCode-Foundation/go-playground/tree/master/design-pattern/creational/abstract-factory-pattern) | [User Guide]() |
13+
| 04| [Singleton](https://github.com/utilityCode-Foundation/go-playground/tree/master/design-pattern/creational/singleton-pattern) | [User Guide]() |
14+
| 05| [Object Pool](https://github.com/utilityCode-Foundation/go-playground/tree/master/design-pattern/creational/object-Pool-pattern) | [User Guide]() |
15+
| 06| [Prototype](https://github.com/utilityCode-Foundation/go-playground/tree/master/design-pattern/creational/prototype-pattern) | [User Guide]() |
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Builder Pattern
2+
```xml
3+
The Builder pattern helps us construct complex objects without directly instantiating their
4+
struct, or writing the logic they require. Imagine an object that could have dozens of fields
5+
that are more complex structs themselves. Now imagine that you have many objects with these
6+
characteristics, and you could have more. We don't want to write the logic to create all these
7+
objects in the package that just needs to use the objects.
8+
```
9+
10+
### Objectives
11+
- Abstract complex creations so that object creation is separated from the object
12+
user
13+
- Create an object step by step by filling its fields and creating the embedded
14+
objects
15+
16+
### About the example
17+
we are going to implement a car builder
18+
19+
### Acceptance criteria
20+
- To be able to build a object step by step with needed property

0 commit comments

Comments
(0)

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