INNER CODE UNIT · Go

exists

shenwei356/rush · helper.go:62

func exists(path string) (bool, error) {
	_, err := os.Stat(path)
	if err == nil {
		return true, nil
	}
	if os.IsNotExist(err) {
		return false, nil
	}
	return false, err
}

const endMarkOfCMD string = "__CMD__\n"

func readSuccCmds(file string) map[string]struct{} {
	cmds := make(map[string]struct{})
	sep := []byte(endMarkOfCMD)
	split := func(data []byte, atEOF bool) (advance int, token []byte, err error) {
		if atEOF && len(data) == 0 {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…