16 def goroot(self):
17 go_root = self.m.vars.workdir.join('go', 'go')
18
19
20
21
22
23
24
25
26
27
28
29
30 symlink_version_file = go_root.join('VERSION')
31 step_result = self.m.
step(
'realpath go/go/VERSION',
32 cmd=['realpath', str(symlink_version_file)],
33 stdout=self.m.raw_io.output_text())
34 step_result = self.m.
step(
'dirname',
35 cmd=['dirname', step_result.stdout],
36 stdout=self.m.raw_io.output_text())
37 go_root_nosymlinks = step_result.stdout.strip()
38 if go_root_nosymlinks != "":
39 return go_root_nosymlinks
40 else:
41
42
43
44 return go_root
45
static int step(int x, SkScalar min, SkScalar max)