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
$ sudo time find / -name "*client*" > /dev/null | |
real 0m1.503s | |
user 0m0.980s | |
sys 0m1.068s |
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 ( | |
"fmt" | |
api "github.com/osrg/gobgp/api" | |
"github.com/osrg/gobgp/config" | |
"github.com/osrg/gobgp/gobgp/cmd" | |
"github.com/osrg/gobgp/packet/bgp" | |
gobgp "github.com/osrg/gobgp/server" | |
"github.com/osrg/gobgp/table" |
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 ( | |
"fmt" | |
api "github.com/osrg/gobgp/api" | |
"github.com/osrg/gobgp/config" | |
"github.com/osrg/gobgp/gobgp/cmd" | |
"github.com/osrg/gobgp/packet/bgp" | |
gobgp "github.com/osrg/gobgp/server" | |
"github.com/osrg/gobgp/table" |
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 ( | |
"fmt" | |
api "github.com/osrg/gobgp/api" | |
"github.com/osrg/gobgp/config" | |
"github.com/osrg/gobgp/gobgp/cmd" | |
"github.com/osrg/gobgp/packet/bgp" | |
gobgp "github.com/osrg/gobgp/server" | |
"github.com/osrg/gobgp/table" |
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 ( | |
"fmt" | |
"os" | |
"strings" | |
"time" | |
api "github.com/osrg/gobgp/api" | |
"github.com/osrg/gobgp/config" |
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 ( | |
"fmt" | |
//"io" | |
"bufio" | |
"os" | |
"time" | |
) | |
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 "fmt" | |
func main() { | |
ch := make(chan string, 3) | |
go func () { | |
ch <- fmt.Sprint("Hello World") | |
ch <- fmt.Sprint("Hello World") | |
ch <- fmt.Sprint("Hello World") |
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 ( | |
"fmt" | |
) | |
func main() { | |
ch := make(chan string, 1) | |
var test 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
package main | |
import ( | |
cryptorand "crypto/rand" | |
"encoding/binary" | |
"fmt" | |
mrand "math/rand" | |
"time" | |
) |
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 "fmt" | |
import "github.com/go-redis/redis" | |
func RedisNewClient() (client *redis.Client){ | |
client = redis.NewClient(&redis.Options{ | |
Addr: "localhost:6379", | |
Password: "", // no password set | |
DB: 0, // use default DB |
OlderNewer