Modify new bytes.ContainsRune to backward compatible bytes.IndexRune
This commit is contained in:
parent
37ab263305
commit
f3dd3ed758
@ -207,7 +207,7 @@ func (p *printer) literalType(lit *ast.LiteralType) []byte {
|
|||||||
case token.STRING:
|
case token.STRING:
|
||||||
// If this is a multiline string, poison lines 2+ so we don't
|
// If this is a multiline string, poison lines 2+ so we don't
|
||||||
// indent them.
|
// indent them.
|
||||||
if bytes.ContainsRune(result, '\n') {
|
if bytes.IndexRune(result, '\n') >= 0 {
|
||||||
result = p.heredocIndent(result)
|
result = p.heredocIndent(result)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user