Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instance.InstanceId missing in 1.3.1 version when using with dep #70

Open
anoop-nair opened this issue Nov 19, 2018 · 1 comment
Open

Comments

@anoop-nair
Copy link

When using fargo as go get github.com/hudl/fargo the Instance struct has a field InstanceId. However, this field is missing when declaring the dependency using dep. A few other fields are different as well. Below is the struct definition in each case.
Using go get:

// Instance [de]serializeable [to|from] Eureka [XML|JSON].
type Instance struct {
	InstanceId       string `xml:"instanceId" json:"instanceId"`  
	HostName         string `xml:"hostName" json:"hostName"`  
	App              string `xml:"app" json:"app"`  
	IPAddr           string `xml:"ipAddr" json:"ipAddr"`  
	VipAddress       string `xml:"vipAddress" json:"vipAddress"`  
	SecureVipAddress string `xml:"secureVipAddress" json:"secureVipAddress"`  
	Status           StatusType `xml:"status" json:"status"`  
	Overriddenstatus StatusType `xml:"overriddenstatus" json:"overriddenstatus"`  
	Port              int  `xml:"-" json:"-"`
	PortEnabled       bool `xml:"-" json:"-"`
	SecurePort        int  `xml:"-" json:"-"`
	SecurePortEnabled bool `xml:"-" json:"-"`
	HomePageUrl    string `xml:"homePageUrl" json:"homePageUrl"`
	StatusPageUrl  string `xml:"statusPageUrl" json:"statusPageUrl"`
	HealthCheckUrl string `xml:"healthCheckUrl" json:"healthCheckUrl"`
	CountryId      int64          `xml:"countryId" json:"countryId"`
	DataCenterInfo DataCenterInfo `xml:"dataCenterInfo" json:"dataCenterInfo"`
	LeaseInfo LeaseInfo        `xml:"leaseInfo" json:"leaseInfo"`
	Metadata  InstanceMetadata `xml:"metadata" json:"metadata"`
	UniqueID func(i Instance) string `xml:"-" json:"-"`
}

Using dep

// Instance [de]serializeable [to|from] Eureka XML.
type Instance struct {
	XMLName          struct{} `xml:"instance" json:"-"`
	HostName         string   `xml:"hostName" json:"hostName"`
	App              string   `xml:"app" json:"app"`
	IPAddr           string   `xml:"ipAddr" json:"ipAddr"`
	VipAddress       string   `xml:"vipAddress" json:"vipAddress"`
	SecureVipAddress string   `xml:"secureVipAddress" json:"secureVipAddress"`
	Status           StatusType `xml:"status" json:"status"`
	Overriddenstatus StatusType `xml:"overriddenstatus" json:"overriddenstatus"`
	Port        int  `xml:"port" json:"-"`
	PortJ       Port `json:"port" xml:"-"`
	SecurePort  int  `xml:"securePort" json:"-"`
	SecurePortJ Port `json:"securePort" xml:"-"`
	HomePageUrl    string `xml:"homePageUrl" json:"homePageUrl"`
	StatusPageUrl  string `xml:"statusPageUrl" json:"statusPageUrl"`
	HealthCheckUrl string `xml:"healthCheckUrl" json:"healthCheckUrl"`
	CountryId      int64          `xml:"countryId" json:"countryId"`
	DataCenterInfo DataCenterInfo `xml:"dataCenterInfo" json:"dataCenterInfo"`
	LeaseInfo LeaseInfo        `xml:"leaseInfo" json:"leaseInfo"`
	Metadata  InstanceMetadata `xml:"metadata" json:"metadata"`
	UniqueID func(i Instance) string `xml:"-" json:"-"`
}

The Gopkg.toml snippet is

.....
[[constraint]]
  name = "github.com/hudl/fargo"
  version = "1.3.1"
.....

Which of these is the correct one and should be used?

@dang312
Copy link

dang312 commented Jul 29, 2019

+1 Need new release include the InstanceId field
You can also set the constrain in Gopkg.toml ( revision is the latest at the time of this comment ) :

[[constraint]]
  revision="fce5cf495554be9ef0766f6f5459e2874fb08c89"
  name="github.com/hudl/fargo"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants