Move to vendor

Signed-off-by: Olivier Gambier <olivier@docker.com>
This commit is contained in:
Olivier Gambier 2016-03-18 14:07:13 -07:00
parent c8d8e7e357
commit 77e69b9cf3
1268 changed files with 34 additions and 24 deletions

View file

@ -0,0 +1,27 @@
package newrelic_platform_go
import (
"log"
"os"
)
type Agent struct {
Host string `json:"host"`
Version string `json:"version"`
Pid int `json:"pid"`
}
func NewAgent(Version string) *Agent {
agent := &Agent{
Version: Version,
}
return agent
}
func (agent *Agent) CollectEnvironmentInfo() {
var err error
agent.Pid = os.Getpid()
if agent.Host, err = os.Hostname(); err != nil {
log.Fatalf("Can not get hostname: %#v \n", err)
}
}