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.
This commit is contained in:
parent
627ab475b7
commit
12634b9ffa
2 changed files with 1 additions and 3 deletions
1
go.mod
1
go.mod
|
@ -3,7 +3,6 @@ module glgroups
|
||||||
go 1.15
|
go 1.15
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/bitfield/script v0.18.0
|
|
||||||
github.com/go-ldap/ldap v3.0.3+incompatible
|
github.com/go-ldap/ldap v3.0.3+incompatible
|
||||||
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
|
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
|
||||||
gopkg.in/yaml.v2 v2.2.2
|
gopkg.in/yaml.v2 v2.2.2
|
||||||
|
|
3
main.go
3
main.go
|
@ -12,7 +12,6 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/bitfield/script"
|
|
||||||
"github.com/go-ldap/ldap"
|
"github.com/go-ldap/ldap"
|
||||||
"gopkg.in/yaml.v2"
|
"gopkg.in/yaml.v2"
|
||||||
)
|
)
|
||||||
|
@ -116,7 +115,7 @@ func loadConfiguration() (configuration Configuration) {
|
||||||
} else {
|
} else {
|
||||||
cfgFile = os.Args[1]
|
cfgFile = os.Args[1]
|
||||||
}
|
}
|
||||||
cfgData, err := script.File(cfgFile).Bytes()
|
cfgData, err := ioutil.ReadFile(cfgFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("could not load configuration: %v", err)
|
log.Fatalf("could not load configuration: %v", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue