Merge pull request #251 from hangyan/function-name-typo
Fix typo in function name and comment
This commit is contained in:
commit
d9ff92051a
|
|
@ -30,9 +30,9 @@ import (
|
||||||
|
|
||||||
var utf8bom = []byte{0xEF, 0xBB, 0xBF}
|
var utf8bom = []byte{0xEF, 0xBB, 0xBF}
|
||||||
|
|
||||||
// proccessEnvFileLine returns a blank key if the line is empty or a comment.
|
// processEnvFileLine returns a blank key if the line is empty or a comment.
|
||||||
// The value will be retrieved from the environment if necessary.
|
// The value will be retrieved from the environment if necessary.
|
||||||
func proccessEnvFileLine(line []byte, filePath string,
|
func processEnvFileLine(line []byte, filePath string,
|
||||||
currentLine int) (key, value string, err error) {
|
currentLine int) (key, value string, err error) {
|
||||||
|
|
||||||
if !utf8.Valid(line) {
|
if !utf8.Valid(line) {
|
||||||
|
|
@ -81,10 +81,10 @@ func addFromEnvFile(filePath string, addTo func(key, value string) error) error
|
||||||
scanner := bufio.NewScanner(f)
|
scanner := bufio.NewScanner(f)
|
||||||
currentLine := 0
|
currentLine := 0
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
// Proccess the current line, retrieving a key/value pair if
|
// Process the current line, retrieving a key/value pair if
|
||||||
// possible.
|
// possible.
|
||||||
scannedBytes := scanner.Bytes()
|
scannedBytes := scanner.Bytes()
|
||||||
key, value, err := proccessEnvFileLine(scannedBytes, filePath, currentLine)
|
key, value, err := processEnvFileLine(scannedBytes, filePath, currentLine)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue