Versions in this module Expand all Collapse all v0 v0.8.0 Jun 26, 2022 Changes in this version + func ChangePkgName(code string, pkgname string) string + func CodeStyleType(typeString string) string + func Format(filename string, src interface{}, opt *Options) ([]byte, error) + func FormatFile(filename string, content []byte, opt *Options) error + func MkdirAll(path string, perm ...os.FileMode) error + func PkgName(filenameOrDirectory string, src interface{}) (string, error) + func ReadSource(filename string, src interface{}) ([]byte, error) + func ReadSourceBytes(src interface{}) ([]byte, error) + func ReplaceFile(fset *token.FileSet, node ast.Node, newCode string) error + func RewriteFile(name string, fn func(content []byte) (newContent []byte, err error)) error + func WriteFile(filename string, data []byte, perm ...os.FileMode) error + type Options = imports.Options