INNER CODE UNIT · Go

getObjectStorageCredentialsFromEnvVars

bliporg/blip · deps/deptool/cmd/main.go:178

func getObjectStorageCredentialsFromEnvVars() (string, string, error) {
	authKey := os.Getenv(digitalOceanSpacesAuthKeyEnvVar)
	authSecret := os.Getenv(digitalOceanSpacesAuthSecretEnvVar)
	if authKey == "" || authSecret == "" {
		return "", "", fmt.Errorf("missing digital ocean spaces auth key or secret")
	}
	return authKey, authSecret, nil
}

// findPathToFirstParentGitRepo finds the path to the first parent git repository
// starting from the current working directory.
// Returns an error if no git repository is found after <limit> iterations.
func findPathToFirstParentGitRepo() (string, error) {
	limit := 20

	// get current working directory
	dir, err := os.Getwd()
	if err != nil {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…