file

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddImportStatement added in v0.0.21

func AddImportStatement(fileName, importName, alias string) error

AddImportStatement 添加import语句 例如: AddImportStatement("main.go", "fmt")

func Append added in v0.0.19

func Append(path string, content string) error

Append 往文件内追加内容

func FindStringsBetween added in v0.0.21

func FindStringsBetween(str, reg string) string

FindStringsBetween 从字符串中查找两个字符串之间的内容

func Has added in v0.0.20

func Has(path string, content string) (bool, error)

Has 判断文件内容是否包含某个字符串

func ReplaceInDir

func ReplaceInDir(dirPath, oldStr, newStr string) error

ReplaceInDir 替换目录下所有文件中的字符串

Types

This section is empty.

Jump to

Keyboard shortcuts

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