package main
import (
"fmt"
"reflect"
)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "net/http" | |
| "github.com/labstack/echo" | |
| ) | |
| func main() { | |
| e := echo.New() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "net/http" | |
| "strconv" | |
| "sync" | |
| "time" | |
| "github.com/labstack/echo" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "gopkg.in/robfig/cron.v2" | |
| "time" | |
| ) | |
| func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "log" | |
| "os" | |
| "os/signal" | |
| "strings" | |
| "sync" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func main() { | |
| emp1 := Emp{"E-1", "Anupam", "Raj", 20} | |
| emp2 := Emp{"E-2", "Rahul", "Anand", 30} | |
| createEmp(emp1) | |
| fmt.Println(getEmps()) | |
| createEmp(emp2) | |
| fmt.Println(getEmps()) | |
| emp3 := Emp{"E-1", "Rahul", "Anand", 30} | |
| updateEmp(emp3) | |
| fmt.Println(getEmps()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "github.com/gocql/gocql" | |
| ) | |
| var Session *gocql.Session |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE KEYSPACE = test | |
| WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }; | |
| CREATE TABLE emps ( | |
| empid text PRIMARY KEY, | |
| first_name text, | |
| last_name text, | |
| age int | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| sarama "gopkg.in/Shopify/sarama.v1" | |
| ) | |
| func main() { |
NewerOlder