INNER CODE UNIT · Go

loadSuiteEnvironment

authelia/authelia · cmd/authelia-suites/main.go:86

func loadSuiteEnvironment(path string) (err error) {
	if _, err = os.Stat(path); err != nil {
		if os.IsNotExist(err) {
			return nil
		}

		return fmt.Errorf("error checking environment file '%s': %w", path, err)
	}

	file, err := os.Open(path)
	if err != nil {
		return fmt.Errorf("error opening environment file '%s': %w", path, err)
	}

	defer file.Close()

	scanner := bufio.NewScanner(file)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…