mirror of
https://github.com/golang/go
synced 2024-10-05 04:21:22 -06:00
aee6b1160e
In a GOROOT path a backslash is a path separator not an escape character. For example, `C:\go`. Fixes gotest error: version.go:3: unknown escape sequence: g R=rsc CC=golang-dev https://golang.org/cl/4437076
16 lines
262 B
C
16 lines
262 B
C
#include <u.h>
|
|
#include <libc.h>
|
|
|
|
char *template =
|
|
"// generated by mkversion.c; do not edit.\n"
|
|
"package runtime\n"
|
|
"const defaultGoroot = `%s`\n"
|
|
"const theVersion = \"%s\"\n";
|
|
|
|
void
|
|
main(void)
|
|
{
|
|
print(template, getgoroot(), getgoversion());
|
|
exits(0);
|
|
}
|