github.com/blend/go-sdk@v1.20220411.3/r2/opt_user_agent.go (about) 1 /* 2 3 Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package r2 9 10 import ( 11 "github.com/blend/go-sdk/webutil" 12 ) 13 14 // OptUserAgent sets the user agent header on a request. 15 // It will initialize the request headers map if it's unset. 16 // It will overwrite any existing user agent header. 17 func OptUserAgent(userAgent string) Option { 18 return RequestOption(webutil.OptHeaderValue(webutil.HeaderUserAgent, userAgent)) 19 }