Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:
sysctl -a | grep machdep.cpu.features | grep VMX
If there's output, you're good!
package main | |
import ( | |
"flag" | |
"fmt" | |
"html/template" | |
"io/ioutil" | |
"os" | |
"strconv" | |
"strings" |
package main | |
import ( | |
"fmt" | |
) | |
type person struct { | |
name string | |
age int | |
} |
package main | |
import ( | |
"errors" | |
"net/http" | |
"strconv" | |
"strings" | |
"time" | |
"github.com/dgrijalva/jwt-go" |
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"github.com/julienschmidt/httprouter" | |
"github.com/looplab/fsm" | |
) |
dataChannel := make(<-chan uint) | |
go iCanRead(dataChannel) | |
iCanWrite(dataChannel) // cannot use dataChannel (type <-chan uint) as type chan uint in argument to iCanWrite |
func iCanRead(inbound chan uint) { | |
for { | |
message, _ := <-inbound | |
time.Sleep(time.Second) | |
// We don't like five, so we put it back in the channel | |
if message == 5 { | |
inbound <- message | |
continue | |
} |
func iCanRead(inbound <-chan uint) { | |
for { | |
message, _ := <-inbound | |
fmt.Println(message) | |
time.Sleep(time.Second) | |
if message == uint(10) { | |
return | |
} | |
} |
func main() { | |
dataChannel := make(chan uint) | |
go iCanRead(dataChannel) | |
iCanWrite(dataChannel) | |
} |
func iCanRead(inbound chan uint) { | |
for { | |
message, _ := <-inbound | |
fmt.Println(message) | |
time.Sleep(time.Second) | |
if message == uint(10) { | |
return | |
} | |
} |