This file contains 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 ( | |
"log" | |
"net/rpc" | |
) | |
type ToDo struct { | |
Title, Status string | |
} |
This file contains 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
finishApp := ToDo{"Finish App", "Started"} | |
makeDinner := ToDo{"Make Dinner", "Not Started"} | |
walkDog := ToDo{"Walk the dog", "Not Started"} | |
task.MakeToDo(finishApp, &reply) | |
task.MakeToDo(makeDinner, &reply) | |
task.MakeToDo(walkDog, &reply) | |
task.DeleteToDo(makeDinner, &reply) | |
task.MakeToDo(makeDinner, &reply) | |
task.GetToDo("Finish App", &reply) | |
task.GetToDo("Finish Application", &reply) |
This file contains 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 ( | |
"log" | |
"net/rpc" | |
) | |
type ToDo struct { | |
Title, Status string | |
} |
This file contains 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
// this is a file that puts together all redigo examples for convenience | |
// (see https://godoc.org/github.com/gomodule/redigo/redis#pkg-examples) | |
// | |
// start by ensuring that redis is running on port 6379 (`redis-server`) | |
// uncomment the main method as needed, and run the script (`go run main.go`) | |
package main | |
import ( | |
"fmt" | |
"github.com/gomodule/redigo/redis" |
OlderNewer