From 12634b9ffada2a41fb2661541d80dc8f061f8730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20BENO=C3=8ET?= Date: Mon, 8 Feb 2021 22:24:25 +0100 Subject: [PATCH] Removed unnecessary dependency I initially intended to use @bitfield's script more than I did, but it seems silly to include it just to read a file. --- go.mod | 1 - main.go | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ba7d3bd..bd63583 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module glgroups go 1.15 require ( - github.com/bitfield/script v0.18.0 github.com/go-ldap/ldap v3.0.3+incompatible gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect gopkg.in/yaml.v2 v2.2.2 diff --git a/main.go b/main.go index 9a5780b..53e80ba 100644 --- a/main.go +++ b/main.go @@ -12,7 +12,6 @@ import ( "os" "strings" - "github.com/bitfield/script" "github.com/go-ldap/ldap" "gopkg.in/yaml.v2" ) @@ -116,7 +115,7 @@ func loadConfiguration() (configuration Configuration) { } else { cfgFile = os.Args[1] } - cfgData, err := script.File(cfgFile).Bytes() + cfgData, err := ioutil.ReadFile(cfgFile) if err != nil { log.Fatalf("could not load configuration: %v", err) }