Skip to content

Commit 0671087

Browse files
committed
style: move code to other place
1 parent 985c7b2 commit 0671087

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/db/v1beta1/mysql/mysql.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,11 @@ func (d *dbConn) GetObservationLog(trialName string, metricName string, startTim
179179
if err != nil {
180180
return nil, fmt.Errorf("Failed to get ObservationLogs %v", err)
181181
}
182+
// Close the rows
183+
defer rows.Close()
182184
result := &v1beta1.ObservationLog{
183185
MetricLogs: []*v1beta1.MetricLog{},
184186
}
185-
// Close the rows
186-
defer rows.Close()
187187
for rows.Next() {
188188
var mname, mvalue, sqlTimeStr string
189189
err := rows.Scan(&sqlTimeStr, &mname, &mvalue)

0 commit comments

Comments
 (0)