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

Side by Side Diff: milo/buildsource/swarming/buildinfo.go

Issue 2974793002: [milo] build_source -> buildSource. (Closed)
Patch Set: reupload Created 3 years, 5 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
« no previous file with comments | « milo/buildsource/swarming/build_test.go ('k') | milo/buildsource/swarming/buildinfo_test.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 260 }
261 261
262 lastChar, lastCharSize := utf8.DecodeLastRuneInString(taskID) 262 lastChar, lastCharSize := utf8.DecodeLastRuneInString(taskID)
263 v, err := strconv.ParseUint(string(lastChar), 16, 8) 263 v, err := strconv.ParseUint(string(lastChar), 16, 8)
264 if err != nil { 264 if err != nil {
265 return "", errors.Annotate(err, "failed to parse hex from rune: %r", lastChar).Err() 265 return "", errors.Annotate(err, "failed to parse hex from rune: %r", lastChar).Err()
266 } 266 }
267 267
268 return taskID[:len(taskID)-lastCharSize] + strconv.FormatUint((v|uint64( tryNumber)), 16), nil 268 return taskID[:len(taskID)-lastCharSize] + strconv.FormatUint((v|uint64( tryNumber)), 16), nil
269 } 269 }
OLDNEW
« no previous file with comments | « milo/buildsource/swarming/build_test.go ('k') | milo/buildsource/swarming/buildinfo_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698