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

Side by Side Diff: client/isolate/utils.go

Issue 2937663002: Sever isolate package's dependency on client/internal. (Closed)
Patch Set: 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
« no previous file with comments | « client/isolate/isolate_test.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The LUCI Authors. All rights reserved. 1 // Copyright 2015 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 isolate 5 package isolate
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "log" 9 "log"
10 "path" 10 "path"
11 "runtime"
11 "strings" 12 "strings"
12 13
13 "github.com/luci/luci-go/common/errors" 14 "github.com/luci/luci-go/common/errors"
14 ) 15 )
15 16
16 // TODO(tandrii): Remove this hacky stuff. 17 // TODO(tandrii): Remove this hacky stuff.
17 // hacky stuff for faster debugging. 18 // hacky stuff for faster debugging.
18 func assertNoError(err error) { 19 func assertNoError(err error) {
19 if err == nil { 20 if err == nil {
20 return 21 return
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 n += 3 127 n += 3
127 } 128 }
128 if t0 != tl { 129 if t0 != tl {
129 buf[n] = '/' 130 buf[n] = '/'
130 copy(buf[n+1:], targ[t0:]) 131 copy(buf[n+1:], targ[t0:])
131 } 132 }
132 return string(buf), nil 133 return string(buf), nil
133 } 134 }
134 return targ[t0:], nil 135 return targ[t0:], nil
135 } 136 }
137
138 // IsWindows returns True when running on the best OS there is.
139 func IsWindows() bool {
140 return runtime.GOOS == "windows"
141 }
OLDNEW
« no previous file with comments | « client/isolate/isolate_test.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698