Files
2024-02-08 17:39:13 +01:00

14 lines
237 B
Go

package libdetectcloud
import (
"net/http"
)
func detectDigitalOcean() string {
resp, err := hc.Get("http://169.254.169.254/metadata/v1/")
if err == nil && resp.StatusCode == http.StatusOK {
return "Digital Ocean"
}
return ""
}