File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ // +build !windows
2
+
1
3
package lile
4
+
5
+ import (
6
+ "net"
7
+ )
8
+
9
+ func formatPlatformTestSeverAddress (uniquePortion string )(string ) {
10
+ return "/tmp/" + uniquePortion
11
+ }
12
+
13
+ func getTestServerListener (address string )(net.Listener , error ) {
14
+ return net .Listen ("unix" , address )
15
+ }
16
+
17
+ func dialTestServer (address string )(net.Conn , error ) {
18
+ return net .Dial ("unix" , address )
19
+ }
Original file line number Diff line number Diff line change
1
+ // +build windows
2
+
1
3
package lile
4
+
5
+ import (
6
+ "github.com/natefinch/npipe"
7
+ "net"
8
+ )
9
+
10
+ func formatPlatformTestSeverAddress (uniquePortion string )(string ) {
11
+ return `\\.\pipe\` + uniquePortion
12
+ }
13
+
14
+ func getTestServerListener (address string )(net.Listener , error ) {
15
+ return npipe .Listen (address )
16
+ }
17
+
18
+ func dialTestServer (address string )(net.Conn , error ) {
19
+ return npipe .Dial (address )
20
+ }
You can’t perform that action at this time.
0 commit comments