opentofu/terraform/user_agent.go
Gavin Williams 401c6a95a7 provider/openstack: Add Terraform version to UserAgent string (#14955)
* core: Add 'UserAgentString' helper function to generate a standard UserAgent string. Example generation: 'Terraform 0.9.7-dev (go1.8.1)'

* provider/openstack: Add Terraform version to UserAgent string
2017-06-01 22:12:25 -06:00

15 lines
264 B
Go

package terraform
import (
"fmt"
"runtime"
)
// The standard Terraform User-Agent format
const UserAgent = "Terraform %s (%s)"
// Generate a UserAgent string
func UserAgentString() string {
return fmt.Sprintf(UserAgent, VersionString(), runtime.Version())
}