LEFT | RIGHT |
(Both sides are equal) |
1 // Copyright 2014 The Go Authors. All rights reserved. | 1 // Copyright 2014 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package profile | 5 package profile |
6 | 6 |
7 import ( | 7 import ( |
8 "errors" | 8 "errors" |
9 "fmt" | 9 "fmt" |
10 "sort" | 10 "sort" |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 if err != nil { | 461 if err != nil { |
462 return "", err | 462 return "", err |
463 } | 463 } |
464 s := int(*strng) | 464 s := int(*strng) |
465 if s < 0 || s >= len(strings) { | 465 if s < 0 || s >= len(strings) { |
466 return "", errMalformed | 466 return "", errMalformed |
467 } | 467 } |
468 *strng = 0 | 468 *strng = 0 |
469 return strings[s], nil | 469 return strings[s], nil |
470 } | 470 } |
LEFT | RIGHT |