aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2023-11-25 13:35:32 -0500
committerSlack Coder <slackcoder@server.ky>2023-11-25 14:11:52 -0500
commitb1ff30a420b35b4e53ca1fb9f64c14aa6b9034d2 (patch)
tree2cef043be308b692de15cd679daac06e47a11ef8
parent2b23d8b0e3e47b91aed7ce775c581dafd3d5016b (diff)
downloadslackware.com-cli-b1ff30a420b35b4e53ca1fb9f64c14aa6b9034d2.tar.xz
README: Fix installation instructionsHEADmaster
-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,