package utils import "os" // Return the API key func getKey() (string, error) { // Get config directory config, err := os.UserConfigDir() if err != nil { return "", err } // Read the file content, err := os.ReadFile(config + "/shodan/api_key") if err != nil { return "", err } return string(content), nil }