Modernize Go code

This commit is contained in:
Kovid Goyal
2026-03-10 14:47:41 +05:30
parent 3d13cf1ca5
commit eddaaed3e3
16 changed files with 64 additions and 87 deletions

View File

@@ -125,7 +125,7 @@ func run_tests(tests []*test_struct) (err error) {
case 'c':
lp.Quit(0)
case 'R':
if idx := bytes.IndexByte(data, ';'); idx > -1 {
if found := bytes.Contains(data, []byte{';'}); found {
if cpos, err := cpos_from_report(utils.UnsafeBytesToString(data[:len(data)-1])); err != nil {
return err
} else {