Skip to content

Commit

Permalink
remove conditional build for 1.17 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
milas committed Sep 26, 2022
1 parent 5afaf82 commit 3d146c7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
9 changes: 0 additions & 9 deletions dotenv/cut.go

This file was deleted.

13 changes: 0 additions & 13 deletions dotenv/cut_go117.go

This file was deleted.

4 changes: 2 additions & 2 deletions dotenv/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ func extractVarValue(src []byte, envMap map[string]string, lookupFn LookupFn) (s
quote, isQuoted := hasQuotePrefix(src)
if !isQuoted {
// unquoted value - read until new line
value, rest, _ := bytesCut(src, []byte("\n"))
value, rest, _ := bytes.Cut(src, []byte("\n"))

// Remove inline comments on unquoted lines
value, _, _ = bytesCut(value, []byte(" #"))
value, _, _ = bytes.Cut(value, []byte(" #"))
value = bytes.TrimRightFunc(value, unicode.IsSpace)
retVal, err := expandVariables(string(value), envMap, lookupFn)
return retVal, rest, err
Expand Down

0 comments on commit 3d146c7

Please sign in to comment.