aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md11
-rw-r--r--internal/slackware_com/mirror.go9
2 files changed, 10 insertions, 10 deletions
diff --git a/README.md b/README.md
index 6b3f192..5176f95 100644
--- a/README.md
+++ b/README.md
@@ -64,6 +64,15 @@ Follow Golang's standard process for installing. It will install the command
into the location pointed to by the GOBIN environment variable or its default
value.
+On Slackware , you want to install programs from third parties under
+the '/usr/local' location.
+
+As root:
+
```
-go install ./cmd/slackware.com
+GOBIN=/usr/local/bin \
+ go install -tags=netcgo ./cmd/slackware.com
```
+
+'-tags=netcgo' makes DNS resolution much more reliable by using the
+systems native DNS resolver.
diff --git a/internal/slackware_com/mirror.go b/internal/slackware_com/mirror.go
index f3bb4a8..bc1549e 100644
--- a/internal/slackware_com/mirror.go
+++ b/internal/slackware_com/mirror.go
@@ -2,11 +2,9 @@ package slackware_com
import (
"bytes"
- "context"
"fmt"
"hash"
"io"
- "net"
"net/http"
"net/url"
"path"
@@ -22,13 +20,6 @@ type Mirror struct {
}
func OpenMirror(mirrorURL *url.URL) (*Mirror, error) {
- var zeroDialer net.Dialer
- transport := http.DefaultTransport.(*http.Transport).Clone()
- transport.DialContext = func(ctx context.Context, network, addr string) (net.Conn, error) {
- return zeroDialer.DialContext(ctx, "tcp4", addr)
- }
- http.DefaultClient.Transport = transport
-
mirror := Mirror{
client: http.DefaultClient,
url: mirrorURL,