mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-20 07:21:26 +02:00
refactor: modernize code with go fix
This commit is contained in:
@@ -68,8 +68,7 @@ func (r *SubstituteEnvReader) Read(p []byte) (n int, err error) {
|
||||
if nMore > 0 {
|
||||
incomplete = append(incomplete, more[:nMore]...)
|
||||
// Check if pattern is now complete
|
||||
//nolint:modernize
|
||||
if idx := bytes.IndexByte(incomplete, '}'); idx >= 0 {
|
||||
if found := bytes.Contains(incomplete, []byte{'}'}); found {
|
||||
// Pattern complete, append the rest back to chunk
|
||||
chunk = append(chunk, incomplete...)
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user