You've already forked libdetectcloud
mirror of
https://github.com/netbirdio/libdetectcloud.git
synced 2026-05-22 17:09:55 -07:00
14 lines
325 B
Go
14 lines
325 B
Go
package libdetectcloud
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func detectSoftlayer() string {
|
|
resp, err := hc.Get("https://api.service.softlayer.com/rest/v3/SoftLayer_Resource_Metadata/UserMetadata.txt")
|
|
if err == nil && (resp.StatusCode == http.StatusOK || resp.StatusCode == http.StatusNotFound) {
|
|
return "SoftLayer"
|
|
}
|
|
return ""
|
|
}
|