{"pageProps":{"posts":[{"slug":"golang-make-api-calls","title":"How to make api calls in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2023-03-04T00:00:00.000Z","url":"golang-make-api-calls","hashtags":"#golang","excerpt":"Learn to make GET and POST requests to external APIs in Golang"},{"slug":"golang-add-key-to-map","title":"How to add a key to a map in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2022-10-22T00:00:00.000Z","url":"golang-add-key-to-map","hashtags":"#golang","excerpt":"Learn how to safely add a key to a map in Golang"},{"slug":"golang-find-type-of-variables","title":"How to find the type of a variable in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2022-10-21T00:00:00.000Z","url":"golang-find-type-of-variables","hashtags":"#golang","excerpt":"Learn two ways to find the type of a variable in Golang"},{"slug":"golang-check-if-map-is-empty","title":"How to check if a map is empty in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2022-09-19T00:00:00.000Z","url":"golang-check-if-map-is-empty","hashtags":"#golang","excerpt":"Learn two ways to check if a map is empty in Golang"},{"slug":"golang-get-slice-of-keys-from-map","title":"How to get a slice of keys from a map in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2022-09-17T03:00:00.000Z","url":"golang-get-slice-of-keys-from-map","hashtags":"#golang","excerpt":"This tutorial is about getting a slice of keys from a map in golang"},{"slug":"golang-interface-to-string","title":"How to convert an interface to a string in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2022-09-13T00:00:00.000Z","url":"golang-interface-to-string","hashtags":"#golang","excerpt":"Convert a golang interface to a golang string using a built-in function"},{"slug":"golang-delete-map-key","title":"How to remove a key from a map in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2022-09-12T00:00:00.000Z","url":"golang-delete-map-key","hashtags":"#golang","excerpt":"Remove an existing key from a map in Golang using a built-in delete function"},{"slug":"golang-string-has-prefix","title":"How to check if a string starts with a substring in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2022-09-11T00:00:00.000Z","url":"golang-string-has-prefix","hashtags":"#golang","excerpt":"Check if a string starts with a substring in Golang"},{"slug":"golang-exit-main-function","title":"How to exit from the main function in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2022-09-09T00:00:00.000Z","url":"golang-exit-main-function","hashtags":"#golang","excerpt":"Learn to exit from the main program when an error occurs inside the main func in golang"},{"slug":"golang-convert-float-to-string","title":"How to convert a float to a string in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2022-08-07T00:00:00.000Z","url":"golang-convert-float-to-string","hashtags":"#golang","excerpt":"Learn to convert a float64 or float32 to a string in golang"},{"slug":"golang-convert-float-to-int","title":"How to convert a float to an int in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2022-08-03T00:00:00.000Z","url":"golang-convert-float-to-int","hashtags":"#golang","excerpt":"Learn to convert a float64 or float32 to an int in golang"},{"slug":"golang-get-current-year","title":"How to get current year in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2022-07-07T00:00:00.000Z","url":"golang-get-current-year","hashtags":"#golang","excerpt":"Learn to get the current year in Golang"},{"slug":"golang-merge-slices","title":"How to merge two slices in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2021-09-16T00:00:00.000Z","url":"golang-merge-slices","hashtags":"#golang","excerpt":"Learn to merge two slices of the same type in Go using a built-in function"},{"slug":"golang-initialize-slice-with-values","title":"How to initialize a slice with values in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2021-09-06T00:00:00.000Z","url":"golang-initialize-slice-with-values","hashtags":"#golang","excerpt":"Learn to initialize a new slice with initial values in Golang using a composite literal"},{"slug":"golang-check-if-slice-is-empty","title":"How to check if a slice is empty in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2021-07-31T00:00:00.000Z","url":"golang-check-if-slice-is-empty","hashtags":"#golang","excerpt":"Learn to check if a slice is empty in Golang using the len() method"},{"slug":"golang-map-contains-key","title":"How to check if a map contains a key in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2021-06-28T00:00:00.000Z","url":"golang-map-contains-key","hashtags":"#golang","excerpt":"Learn to check if a map contains a key in Golang"},{"slug":"golang-multiline-strings","title":"How do you write multi-line strings in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2021-06-26T01:00:00.000Z","url":"golang-multiline-strings","hashtags":"#golang","excerpt":"Learn to write multi-line strings in your Golang code"},{"slug":"golang-is-file-exists","title":"How to check if a file exists in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2021-06-26T00:00:00.000Z","url":"golang-is-file-exists","hashtags":"#golang","excerpt":"Learn to check if a file with a given file path exists in Golang 1.16"},{"slug":"golang-read-text-file","title":"How to read a text file in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2021-06-25T00:00:00.000Z","url":"golang-read-text-file","hashtags":"#golang","excerpt":"Learn to read a text file in Golang using the ioutil.ReadFile function"},{"slug":"golang-ints-are-sorted-func","title":"How to check if an array of int values are sorted in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2021-06-23T03:00:00.000Z","url":"golang-ints-are-sorted-func","hashtags":"#golang","excerpt":"Learn to check if an array of int values are sorted in increasing order in Golang"},{"slug":"golang-strings-contains-func","title":"How check if a string contains a substring in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2021-06-22T00:00:00.000Z","url":"golang-strings-contains-func","hashtags":"#golang","excerpt":"Learn to use strings.Contains function in Golang to check whether a given string contains a substring or not"},{"slug":"golang-create-map","title":"How to create a map in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2021-06-20T00:00:00.000Z","url":"golang-create-map","hashtags":"#golang","excerpt":"Learn to create and initialize a map of key-value pairs in Golang using the built-in make function"},{"slug":"golang-initialize-slice","title":"How to initialize a slice in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2021-06-19T03:00:00.000Z","url":"golang-initialize-slice","hashtags":"#golang","excerpt":"Learn to create and initialize a slice of structs in Golang using built-in make function"},{"slug":"golang-json-to-struct","title":"How to convert a JSON to a Struct in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2021-06-19T02:00:00.000Z","url":"golang-json-to-struct","hashtags":"#golang","excerpt":"Learn to convert a JSON string to a struct using a package json UnMarshal function"},{"slug":"golang-struct-to-json","title":"How to convert a Struct to a JSON in Golang","author":{"name":"Suraj Sharma","picture":""},"date":"2021-06-19T00:00:00.000Z","url":"golang-struct-to-json","hashtags":"#golang","excerpt":"Learn to convert a struct to a JSON using a package json Marshal function"}]},"__N_SSG":true}