Implement go/analyzer
and refactor.
Now can call gci
as library:
package main
import (
"fmt"
"github.com/daixiang0/gci/pkg/gci"
)
func main() {
diff, err := gci.Run("/path/to/test.go", &gci.FlagSet{LocalFlag: localFlag})
// handle diff and err ...
}