func createNewBuildInfo() (buildInfo *BuildInfo) {
	buildInfo = new(BuildInfo)
	buildInfo.Agent = new(CliAgent)
	buildInfo.Agent.Name = cliutils.CliAgent
	buildInfo.Agent.Version = cliutils.GetVersion()
	buildInfo.BuildAgent = new(CliAgent)
	buildInfo.BuildAgent.Name = "GENERIC"
	buildInfo.BuildAgent.Version = cliutils.GetVersion()
	buildInfo.Modules = make([]*Modules, 0)
	return
}
Exemple #2
0
func addUserAgentHeader(req *http.Request) {
	req.Header.Set("User-Agent", cliutils.CliAgent+"/"+cliutils.GetVersion())
}