From 4b85ede24678bf4c7d6c33af8fb67d2c760d5d81 Mon Sep 17 00:00:00 2001 From: Iain Earl Date: Sun, 7 Oct 2018 00:43:31 +0100 Subject: [PATCH 1/2] Adding basic golang json example --- code/hacktober.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 code/hacktober.go diff --git a/code/hacktober.go b/code/hacktober.go new file mode 100644 index 0000000..78d4287 --- /dev/null +++ b/code/hacktober.go @@ -0,0 +1,22 @@ +package main + +import ( + "fmt" + "time" + "encoding/json" +) + +type Hacktober struct { + Message string `json:"msg"` + Date time.Time `json:"date"` +} + +func main () { + data := Hacktober{ + Message: "Hello Hacktoberfest 2018!", + Date: time.Now(), + } + + jsonBytes, _ := json.MarshalIndent(data, "", " ") + fmt.Println(string(jsonBytes)) +} From b8c236015ce8fff49c241d501a438214387da03a Mon Sep 17 00:00:00 2001 From: Iain Earl Date: Sun, 7 Oct 2018 00:45:57 +0100 Subject: [PATCH 2/2] Adding myself to the README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 06ba005..8931d51 100644 --- a/README.md +++ b/README.md @@ -432,6 +432,10 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU # I +### Iain Earl +- DevOps Engineer, UK +- [![github-alt][github-img]](https://github.com/itmecho) + ### IGC - I am a Spanish CS student and developer. - I like Java and Python.