Skip to content

Commit c8e91f0

Browse files
authored
chore: bump version 0.9.1 (#200)
1 parent 14cbc49 commit c8e91f0

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.9.0
1+
0.9.1

batch.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ func (b *httpBatch) AppendToFile(row []driver.Value) error {
110110
lineData := make([]string, 0, len(row))
111111
for _, v := range row {
112112
var s string
113-
switch v.(type) {
113+
switch v := v.(type) {
114114
case string:
115-
s = v.(string)
115+
s = v
116116
case time.Time:
117-
s = v.(time.Time).Format(timeFormat)
117+
s = v.Format(timeFormat)
118118
case date:
119-
s = time.Time(v.(date)).Format(dateFormat)
119+
s = time.Time(v).Format(dateFormat)
120120
default:
121121
bytes, err := textEncode.Encode(v)
122122
if err != nil {

client.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,10 @@ func (c *APIClient) authMethod() AuthMethod {
342342
func (c *APIClient) makeHeaders(ctx context.Context) (http.Header, error) {
343343
headers := http.Header{}
344344
headers.Set(WarehouseRoute, "warehouse")
345-
headers.Set(UserAgent, fmt.Sprintf("databend-go/%s", version))
345+
pkgVersion := strings.TrimSpace(version)
346+
headers.Set(UserAgent, fmt.Sprintf("databend-go/%s", pkgVersion))
346347
if userAgent, ok := ctx.Value(ContextUserAgentID).(string); ok {
347-
headers.Set(UserAgent, fmt.Sprintf("databend-go/%s/%s", version, userAgent))
348+
headers.Set(UserAgent, fmt.Sprintf("databend-go/%s/%s", pkgVersion, userAgent))
348349
}
349350
if c.tenant != "" {
350351
headers.Set(DatabendTenantHeader, c.tenant)

0 commit comments

Comments
 (0)