Skip to content

Commit af8920f

Browse files
committed
internal: disable daemon from darwin
1 parent 57faf66 commit af8920f

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

internal/lock/creds_darwin.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package lock
2+
3+
// +build darwin
4+
5+
import (
6+
"errors"
7+
"net"
8+
)
9+
10+
func writeCredentials(c *net.UnixConn) error {
11+
return errors.New("unimplemented")
12+
}

internal/lock/creds.go renamed to internal/lock/creds_linux.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package lock
22

3+
// +build !darwin
4+
35
import (
46
"fmt"
57
"net"

internal/lock/daemon_darwin.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package lock
2+
3+
import (
4+
"log"
5+
)
6+
7+
// +build darwin
8+
9+
// RunDaemon runs lock daemon
10+
func RunDaemon() {
11+
log.Fatal("running daemon on darwin systems are not supported.")
12+
}

internal/lock/daemon.go renamed to internal/lock/daemon_linux.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package lock
22

3+
// +build !darwin
4+
35
import (
46
"encoding/gob"
57
"fmt"

0 commit comments

Comments
 (0)