Skip to content
Snippets Groups Projects
Verified Commit 9ad429d7 authored by meskio's avatar meskio :tent:
Browse files

[pkg] windows doesn't have curve

Let's have our own hasCurve() func to don't use curve if is windows.
parent 3681fd33
No related branches found
No related tags found
1 merge request!14[feat] configure the zmq bitmask endpoint per platform
......@@ -16,8 +16,16 @@
package bitmask
import "os"
import (
"os"
"github.com/pebbe/zmq4"
)
const coreEndpoint = "ipc:///var/tmp/bitmask.core.sock"
var ConfigPath = os.Getenv("HOME") + "/Library/Preferences/leap"
func hasCurve() bool {
return zmq4.HasCurve()
}
......@@ -35,7 +35,7 @@ func initEvents() (*zmq4.Socket, error) {
return nil, err
}
if zmq4.HasCurve() {
if hasCurve() {
err = initCurve(socket)
if err != nil {
return nil, err
......
......@@ -16,8 +16,16 @@
package bitmask
import "os"
import (
"os"
"github.com/pebbe/zmq4"
)
const coreEndpoint = "ipc:///var/tmp/bitmask.core.sock"
var ConfigPath = os.Getenv("HOME") + "/.config/leap"
func hasCurve() bool {
return zmq4.HasCurve()
}
......@@ -21,3 +21,7 @@ import "os"
const coreEndpoint = "tcp://127.0.0.1:5001"
var ConfigPath = os.Getenv("APPDATA") + "\\leap"
func hasCurve() bool {
return false
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment