maybe an alternative to look at?
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
6ce08105ad
commit
0ee9a0e661
|
@ -10,6 +10,9 @@ import "github.com/gorilla/websocket"
|
|||
import "github.com/golang/protobuf/proto"
|
||||
import pb "git.wit.com/wit/witProtobuf"
|
||||
|
||||
// Also potentially look at:
|
||||
// https://www.reddit.com/r/golang/comments/boznnz/an_alternative_to_gorilla_sessions_jeff_manage/
|
||||
|
||||
var upgrader = websocket.Upgrader{
|
||||
ReadBufferSize: 4096,
|
||||
WriteBufferSize: 4096,
|
||||
|
|
|
@ -11,7 +11,8 @@ import "github.com/davecgh/go-spew/spew"
|
|||
import pb "git.wit.com/wit/witProtobuf"
|
||||
|
||||
const (
|
||||
JWT = "eyJhbGciOiJFUzM4NCIsInR5cCI6IkpXVCJ9.eyJ4IjoyLCJyIjoiIiwiY3NyZiI6Ilk3MkZvM1RpQXZVRUl0RHhaRnpsZTZDVCIsImV4cCI6MTU1Nzc3NDM0OCwiaXNzIjoid2l0Iiwic3ViIjoiYm1hdGhAd2l0LmNvbSJ9.AOnsc8XiE9WemSfY2LU4ll_0wZJtLJvlf1Jjy_Cxt89uxc6Mts_dva4w1xQNQAYUaYqc9HPtHIimWxvbApRs45bYq6vNFbOFwieu3XQ9374f0u6g5NZoplURE7WbZvSJ"
|
||||
// JWT = "eyJhbGciOiJFUzM4NCIsInR5cCI6IkpXVCJ9.eyJ4IjoyLCJyIjoiIiwiY3NyZiI6Ilk3MkZvM1RpQXZVRUl0RHhaRnpsZTZDVCIsImV4cCI6MTU1Nzc3NDM0OCwiaXNzIjoid2l0Iiwic3ViIjoiYm1hdGhAd2l0LmNvbSJ9.AOnsc8XiE9WemSfY2LU4ll_0wZJtLJvlf1Jjy_Cxt89uxc6Mts_dva4w1xQNQAYUaYqc9HPtHIimWxvbApRs45bYq6vNFbOFwieu3XQ9374f0u6g5NZoplURE7WbZvSJ"
|
||||
JWT = "eyJhbGciOiJFUzM4NCIsInR5cCI6IkpXVCJ9.eyJ4IjoyLCJyIjoiIiwiY3NyZiI6ImR2VDNoS3d3UGxoNHVkaFhLRlpaVlc4bCIsImV4cCI6MTU1ODU0MzAwMSwiaXNzIjoid2l0Iiwic3ViIjoiYm1hdGhAd2l0LmNvbSJ9.N76n7qnt4S0SQAxmsjxV6rR0TLrvf-kHpYgPBUcBUlJX_H8Wne1rTffjml2WOw-2Dc3lKPKOTX8RIAP6lwPFUUtaF2VeHaDbi8yvqpnZ8GE-8c-PG1tqZigkWmoo8PSx"
|
||||
API = "http://stackapi:4000/"
|
||||
MAX_NETS = 10
|
||||
MAX_VMS = 10
|
||||
|
@ -31,8 +32,8 @@ func fetchNetworks() []network {
|
|||
if err != nil { log.Printf("Can't exec the req to list networks: %s", err) }
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil { log.Fatal("can't read resp") }
|
||||
log.Printf("NETWORKS =", networks)
|
||||
if networks == nil {
|
||||
log.Printf("NETWORKS =", body)
|
||||
if body == nil {
|
||||
log.Println("networks is nil")
|
||||
} else {
|
||||
err = json.Unmarshal(body, &networks)
|
||||
|
|
Loading…
Reference in New Issue