ranges

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fix

func Fix(in io.Reader) (io.Reader, error)

Fix takes a reader that represents a go source file, and returns a reader with integer for loops changed to range statements. If no for loops are able to converted, returns a nil reader and nil error.

func FixFile

func FixFile(filename string, dryrun bool) error

Fix integer loops into ranges for a given file, skipping actually editing the file if dryrun is set.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL