Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: milo/appengine/job_source/swarming/buildinfo.go

Issue 2944983003: [milo] {buildbucket,buildbot,swarming,logdog} -> backends/*. (Closed)
Patch Set: fix the tests Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2017 The LUCI Authors. All rights reserved. 1 // Copyright 2017 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package swarming 5 package swarming
6 6
7 import ( 7 import (
8 "strconv" 8 "strconv"
9 "strings" 9 "strings"
10 "unicode/utf8" 10 "unicode/utf8"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 lastChar, lastCharSize := utf8.DecodeLastRuneInString(taskID) 267 lastChar, lastCharSize := utf8.DecodeLastRuneInString(taskID)
268 v, err := strconv.ParseUint(string(lastChar), 16, 8) 268 v, err := strconv.ParseUint(string(lastChar), 16, 8)
269 if err != nil { 269 if err != nil {
270 return "", errors.Annotate(err).Reason("failed to parse hex from rune: %(rune)r"). 270 return "", errors.Annotate(err).Reason("failed to parse hex from rune: %(rune)r").
271 D("rune", lastChar). 271 D("rune", lastChar).
272 Err() 272 Err()
273 } 273 }
274 274
275 return taskID[:len(taskID)-lastCharSize] + strconv.FormatUint((v|uint64( tryNumber)), 16), nil 275 return taskID[:len(taskID)-lastCharSize] + strconv.FormatUint((v|uint64( tryNumber)), 16), nil
276 } 276 }
OLDNEW
« no previous file with comments | « milo/appengine/job_source/swarming/build_test.go ('k') | milo/appengine/job_source/swarming/buildinfo_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698