Skip to content

Commit

Permalink
v1.1 refactored
Browse files Browse the repository at this point in the history
  • Loading branch information
esperlu committed Jul 4, 2020
1 parent b94a7ef commit 83be2c0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions gomount.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ func checkErr(err error) {
// readConfig validates and process the config file.
func readConfig(confFile string) ([]server, error) {
var hosts []server
var lineNumber int
var sErr []error
var numberedLines string

// Open and read config file
f, err := os.Open(confFile)
Expand All @@ -148,10 +151,6 @@ func readConfig(confFile string) ([]server, error) {
defer f.Close()

// Scan through config file
var lineNumber int
var sErr []error
var numberedLines string

scanner := bufio.NewScanner(f)
for scanner.Scan() {
lineNumber++
Expand Down

0 comments on commit 83be2c0

Please sign in to comment.