Fix incorrect use of metadata library, correct typo
This commit is contained in:
parent
ec240b60c5
commit
0a84ac1cda
@ -125,7 +125,7 @@ type InstanceType string
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
NoInstance InstanceType = "None"
|
NoInstance InstanceType = "None"
|
||||||
UnknownInstance = "Uknown"
|
UnknownInstance = "Unknown"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MachineInfo struct {
|
type MachineInfo struct {
|
||||||
|
@ -26,7 +26,7 @@ func onGCE() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getGceInstanceType() info.InstanceType {
|
func getGceInstanceType() info.InstanceType {
|
||||||
machineType, err := metadata.Get("machine-type")
|
machineType, err := metadata.Get("instance/machine-type")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return info.UnknownInstance
|
return info.UnknownInstance
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user