• red_car's avatar
    Downloader helper user agent (#227) · 6b9d8e5d
    red_car authored
    * add global variables and Info struct in order to inject build time values via ldflags
    
    * replace cli.AppName with global variable global.GetAppName() getter
    
    * replaced cli.Version var with global getter
    
    * add .idea to .gitignore
    
    * re organize imports
    
    * add license to global.go
    
    * add hardcoded fallback version string
    
    * organize imports step2
    
    * organize imports step3
    
    * replace cli.AppName with global variable global.GetAppName() getter
    
    * add User-Agent header to downloader helper configuration
    
    * add testing for user agent-string generation
    
    * re organize imports
    
    * refactor global package into version package and rename and replace having cli login,logout,validate removed
    
    * refactor versioning variables in version package and implement Info struct wihth String method
    
    * refactor Info cosntructor to use directly package vars and renamed package from global to version
    
    * replace package name from global to version
    
    * solve package name clash for version and cli/version
    
    * replace application name getter with VersionInfo.Application field
    having removed cli login,logout,validate
    
    * search and replace version string getter with VersionInfo.VersionString field
    
    * implement empty http.Header struct propagation from cli to resources
    
    * align downloader helper to use propagated http.Header from upper layers and modify test accordingly
    
    * align daemon to use empty http.Header as struct field in ArduinoCoreServerImpl
    
    * clean inside cobra commands for empty http.Header struct and inject headers build from VersionInfo struct in cli InitInstance func
    
    * remove unused runDaemonCommand in daemon
    
    * add user agent specific for daemon mode via DownloaderHeaders property for ArduinoCoreServerImpl
    
    * add testing information in README.md
    
    * removed getters and related usage for version package
    
    * update dependencies
    
    * finalize helpers_test User-Agent header value
    
    * add integration test for version info injection via vars
    
    * tidy go mod and reorganize imports and tidy long lines
    
    * inject ldflags variables in build task in Taskfile.yml
    
    * replace commands in /travis.yml with tasks properly merging flags
    
    * fix install command for go-task to solve "undefined: interp.EnvFromList" error
    
    * add coverage files to .gitignore
    
    * tidy dependencies in go.mod
    
    * update task executable path in tasks due to install path generated by go-task install script
    
    * implement exported variable cli.HTTPClientHeader in order to have it available in all cli subpackages and not onli in cli
    
    * fix comment replacing "version config" with "global config"
    
    * leverage cli.VersionInfo to present a better terminal and json data for version info
    6b9d8e5d
root.go 6.43 KB