INNER CODE UNIT · Go

exists

buildpacks-community/kpack · cmd/build-waiter/main.go:135

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

		return false, err
	}

	return true, nil
}

func exitWithError(message, errorFile string) {
	if errorFile != "" {
		os.WriteFile(errorFile, []byte(message), 0666)
	}

	log.Fatal(message)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…