go1.25 bumped lib version added in dotenv assign func
This commit is contained in:
@@ -23,7 +23,7 @@ const (
|
||||
)
|
||||
|
||||
func parseBytes(src []byte, out map[string]string) error {
|
||||
src = bytes.Replace(src, []byte("\r\n"), []byte("\n"), -1)
|
||||
src = bytes.ReplaceAll(src, []byte("\r\n"), []byte("\n"))
|
||||
cutset := src
|
||||
for {
|
||||
cutset = getStatementStart(cutset)
|
||||
@@ -76,8 +76,8 @@ func getStatementStart(src []byte) []byte {
|
||||
func locateKeyName(src []byte) (key string, cutset []byte, err error) {
|
||||
// trim "export" and space at beginning
|
||||
src = bytes.TrimLeftFunc(src, isSpace)
|
||||
if bytes.HasPrefix(src, []byte(exportPrefix)) {
|
||||
trimmed := bytes.TrimPrefix(src, []byte(exportPrefix))
|
||||
if after, ok := bytes.CutPrefix(src, []byte(exportPrefix)); ok {
|
||||
trimmed := after
|
||||
if bytes.IndexFunc(trimmed, isSpace) == 0 {
|
||||
src = bytes.TrimLeftFunc(trimmed, isSpace)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user