From b1ff30a420b35b4e53ca1fb9f64c14aa6b9034d2 Mon Sep 17 00:00:00 2001 From: Slack Coder Date: Sat, 25 Nov 2023 13:35:32 -0500 Subject: README: Fix installation instructions --- README.md | 11 ++++++++++- internal/slackware_com/mirror.go | 9 --------- 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, -- cgit v1.2.3