INNER CODE UNIT · Go

checkError

shenwei356/rush · cobra_helper.go:32

func checkError(err error) {
	if err != nil {
		log.Error(err)
		os.Exit(-1)
	}
}

func getFileList(args []string) []string {
	files := []string{}
	if len(args) == 0 {
		files = append(files, "-")
	} else {
		for _, file := range files {
			if file == "-" {
				continue
			}
			if _, err := os.Stat(file); os.IsNotExist(err) {
				checkError(err)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…