mirror of
https://github.com/go-i2p/go-gittisane.git
synced 2025-06-08 09:16:22 -04:00
Update guide
This commit is contained in:
2
.github/workflows/gitea-build.yml
vendored
2
.github/workflows/gitea-build.yml
vendored
@ -76,6 +76,8 @@ jobs:
|
||||
run: |
|
||||
make clean
|
||||
cp -v ../net_anon.go modules/graceful/net_anon.go
|
||||
cp -v ../net_anon_unix.go modules/graceful/net_anon.go
|
||||
cp -v ../net_anon_windows.go modules/graceful/net_anon.go
|
||||
go mod tidy
|
||||
make build
|
||||
env:
|
||||
|
23
net_anon_unix.go
Normal file
23
net_anon_unix.go
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright 2019 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
// This code is heavily inspired by the archived gofacebook/gracenet/net.go handler
|
||||
|
||||
//go:build !windows
|
||||
|
||||
package graceful
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
)
|
||||
|
||||
func GetListenerUnix(network string, addr net.Addr) (net.Listener, error) {
|
||||
switch addr.(type) {
|
||||
case *net.UnixAddr:
|
||||
return net.ListenUnix(network, addr.(*net.UnixAddr))
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown address type %T", addr)
|
||||
}
|
||||
|
||||
}
|
14
net_anon_windows.go
Normal file
14
net_anon_windows.go
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright 2019 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
// This code is heavily inspired by the archived gofacebook/gracenet/net.go handler
|
||||
|
||||
//go:build windows
|
||||
|
||||
package graceful
|
||||
|
||||
import "net"
|
||||
|
||||
func GetListenerUnix(network string, addr net.Addr) (net.Listener, error) {
|
||||
return nil, nil
|
||||
}
|
Reference in New Issue
Block a user