Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Irshad irshadhasmat

🎯
Focusing
  • AngelOne
  • Mumbai, Maharashtra, India
View GitHub Profile
View GoLang_REDIS_PUB_SUB.go
package main
import (
"fmt"
"log"
"time"
"github.com/gomodule/redigo/redis"
)
View Embedded_Object_In_JSON_Array_Parsing.go
package main
import (
"encoding/json"
"fmt"
)
func main() {
//Simple Employee JSON object which we will parse
empArray := `[
View Embedded_Object_JSON_Parsing.go
package main
import (
"encoding/json"
"fmt"
)
func main() {
//Simple Employee JSON object which we will parse
empJson := `{
View Simple_JSON_Array_Parsing.go
package main
import (
"encoding/json"
"fmt"
)
func main() {
//Simple Employee JSON which we will parse
empArray := `[
View SIMPLE_JSON_OBJECT_PARSING.go
package main
import (
"encoding/json"
"fmt"
)
func main() {
//Simple Employee JSON object which we will parse
empJson := `{
@irshadhasmat
irshadhasmat / CockroachDB_Employee_CRUD_GOLang.go
Created May 31, 2018
Code Snippet to perform CRUD operation in Go Lang
View CockroachDB_Employee_CRUD_GOLang.go
package main
import (
"database/sql"
"fmt"
"log"
_ "github.com/lib/pq"
)
View Create_Table_Employee.sql
CREATE TABLE "tbl_employee" (
"employee_id" SERIAL,
"full_name" STRING(100),
"department" STRING(50),
"designation" STRING(50),
"created_at" TIMESTAMPTZ,
"updated_at" TIMESTAMPTZ,
PRIMARY KEY ("employee_id")
);
@irshadhasmat
irshadhasmat / Int_and_Int64_To_String.go
Created May 29, 2018
GoLang : Int & Int64 to String Conversion
View Int_and_Int64_To_String.go
package main
import (
"fmt"
"strconv"
)
func main() {
var i int = 12345
var i64 int64 = 12345
@irshadhasmat
irshadhasmat / strToInt64.go
Created May 29, 2018
GoLang : String to Int64 Conversion
View strToInt64.go
package main
import (
"fmt"
"strconv"
)
func main() {
str := "12345"
@irshadhasmat
irshadhasmat / strToint.go
Created May 29, 2018
GoLang : String to Int Conversion
View strToint.go
package main
import (
"fmt"
"strconv"
)
func main() {
str := "12345"