Skip to content

Instantly share code, notes, and snippets.

View irshadhasmat's full-sized avatar
🎯
Focusing

Irshad irshadhasmat

🎯
Focusing
  • Xebia
  • Mumbai, Maharashtra, India
  • 05:53 (UTC +05:30)
View GitHub Profile
package main
import (
"fmt"
"log"
"time"
"github.com/gomodule/redigo/redis"
)
package main
import (
"encoding/json"
"fmt"
)
func main() {
//Simple Employee JSON object which we will parse
empArray := `[
package main
import (
"encoding/json"
"fmt"
)
func main() {
//Simple Employee JSON object which we will parse
empJson := `{
package main
import (
"encoding/json"
"fmt"
)
func main() {
//Simple Employee JSON which we will parse
empArray := `[
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 15:25
Code Snippet to perform CRUD operation in Go Lang
package main
import (
"database/sql"
"fmt"
"log"
_ "github.com/lib/pq"
)
@irshadhasmat
irshadhasmat / Create_Table_Employee.sql
Created May 31, 2018 14:56
Create Table Employee
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 06:10
GoLang : Int & Int64 to String Conversion
package main
import (
"fmt"
"strconv"
)
func main() {
var i int = 12345
var i64 int64 = 12345
@irshadhasmat
irshadhasmat / strToInt64.go
Created May 29, 2018 05:56
GoLang : String to Int64 Conversion
package main
import (
"fmt"
"strconv"
)
func main() {
str := "12345"
@irshadhasmat
irshadhasmat / strToint.go
Created May 29, 2018 05:45
GoLang : String to Int Conversion
package main
import (
"fmt"
"strconv"
)
func main() {
str := "12345"