Skip to content

Commit

Permalink
Fix registered trademark and other acronyms
Browse files Browse the repository at this point in the history
  • Loading branch information
ccoVeille committed Apr 2, 2024
1 parent e65cc0c commit 19affb0
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ See [Quick Start](#quick-start) and [Documentation](./doc) for more details.
# macOS and Linux (and WSL)
curl -fsSL https://github.com/xhd2015/xgo/raw/master/install.sh | bash

# windows
# Windows
powershell -c "irm github.com/xhd2015/xgo/raw/master/install.ps1|iex"
```

Expand Down Expand Up @@ -417,11 +417,11 @@ So I created `xgo`, so I hope `xgo` will also take over other solutions to the m
# Comparing `xgo` with `monkey`
The project [bouk/monkey](https://github.com/bouk/monkey), was initially created by bouk, as described in his blog https://bou.ke/blog/monkey-patching-in-go.

In short, it uses a low level assembly hack to replace function at runtime. Which exposes lots of confusing problems to its users as it gets used more and more widely(especially on MacOS).
In short, it uses a low level assembly hack to replace function at runtime. Which exposes lots of confusing problems to its users as it gets used more and more widely(especially on macOS).

Then it was archived and no longer maintained by the author himself. However, two projects later take over the asm idea and add support for newer go versions and architectures like Apple M1.
Then it was archived and no longer maintained by the author himself. However, two projects later take over the ASM idea and add support for newer go versions and architectures like Apple M1.

Still, the two does not solve the underlying compatibility issues introduced by asm, including cross-platform support, the need to write to a read-only section of the execution code and lacking of general mock.
Still, the two does not solve the underlying compatibility issues introduced by ASM, including cross-platform support, the need to write to a read-only section of the execution code and lacking of general mock.

So developers still get annoying failures every now and then.

Expand Down
4 changes: 2 additions & 2 deletions README_zh_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# macOS和Linux(包括 WSL)
curl -fsSL https://github.com/xhd2015/xgo/raw/master/install.sh | bash

# windows
# Windows
powershell -c "irm github.com/xhd2015/xgo/raw/master/install.ps1|iex"
```

Expand Down Expand Up @@ -56,7 +56,7 @@ xgo version
对OS和Arch没有限制, `xgo`支持所有`go`支持的OS和Arch。

OS:
- MacOS
- macOS
- Linux
- Windows (+WSL)
- ...
Expand Down
2 changes: 1 addition & 1 deletion cmd/exec_tool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func main() {
os.Exit(1)
}

// on windows, cmd ends with .exe
// on Windows, cmd ends with .exe
baseName := filepath.Base(cmd)
isCompile := baseName == "compile"
if !isCompile && runtime.GOOS == "windows" {
Expand Down
2 changes: 1 addition & 1 deletion cmd/xgo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func handleBuild(cmd string, args []string) error {
logDebug("instrument dir: %s", instrumentDir)

exeSuffix := osinfo.EXE_SUFFIX
// NOTE: on windows, go build -o xxx will always yield xxx.exe
// NOTE: on Windows, go build -o xxx will always yield xxx.exe
execToolBin := filepath.Join(binDir, "exec_tool"+exeSuffix)
compileLog := filepath.Join(logDir, "compile.log")
compilerBin := filepath.Join(instrumentDir, "compile"+exeSuffix)
Expand Down
6 changes: 3 additions & 3 deletions cmd/xgo/patch_compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func patchGcMain(goroot string, goVersion *goinfo.GoVersion) error {
}

// turn off inline when there is rewrite(gcflags=-l)
// windows: also turn off optimization(gcflags=-N)
// Windows: also turn off optimization(gcflags=-N)
var flagNSwitch = ""
if runtime.GOOS == "windows" {
flagNSwitch = "\n" + "base.Flag.N = 1"
Expand Down Expand Up @@ -282,7 +282,7 @@ func importCompileInternalPatch(goroot string, xgoSrc string, forceReset bool, s
if isDevelopment {
symLink := syncWithLink
if osinfo.FORCE_COPY_UNSYM {
// windows: A required privilege is not held by the client.
// Windows: A required privilege is not held by the client.
symLink = false
}
// copy compiler internal dependencies
Expand Down Expand Up @@ -325,7 +325,7 @@ func importCompileInternalPatch(goroot string, xgoSrc string, forceReset bool, s
if path == "patch_compiler" {
return os.MkdirAll(dstDir, 0755)
}
// TODO: test on windows if "/" works
// TODO: test on Windows if "/" works
dstPath := filepath.Join(dstDir, strings.TrimPrefix(path, "patch_compiler/"))
if d.IsDir() {
return os.MkdirAll(dstPath, 0755)
Expand Down
2 changes: 1 addition & 1 deletion cmd/xgo/pathsum/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func shortPath(path string, maxSeg int) string {
// seg = strings.ReplaceAll(seg, "?", "")
// seg = strings.ReplaceAll(seg, "$", "")
// seg = strings.ReplaceAll(seg, "&", "")
// seg = strings.ReplaceAll(seg, ":", "") // windows
// seg = strings.ReplaceAll(seg, ":", "") // Windows
// seg = strings.ReplaceAll(seg, ";", "")
// seg = strings.ReplaceAll(seg, "%", "")
// seg = strings.ReplaceAll(seg, "#", "")
Expand Down
2 changes: 1 addition & 1 deletion cmd/xgo/pathsum/path_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func TestProcessSpecial(t *testing.T) {
{"", ""},
{"/", ""},
{"/a", "a"},
{"C:/a", "Ca"}, // windows
{"C:/a", "Ca"}, // Windows
{"C:\\a", "Ca"},
{"/ab/c", "abc"},
{"/ab/c", "abc"},
Expand Down
2 changes: 1 addition & 1 deletion cmd/xgo/upgrade/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func Upgrade(installDir string) error {
return err
}
} else {
// windows
// Windows
tmpUnzip := filepath.Join(tmpDir, "unzip")
err = os.MkdirAll(tmpUnzip, 0755)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion patch/ir.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func getAdjustedFile(f string) string {
if runtime.GOOS != "windows" {
return ""
}
// for windows, posFile has the form:
// for Windows, posFile has the form:
// C:/a/b/c
// while syncDeclMapping's file has the form:
// C:\a\b\c
Expand Down
2 changes: 1 addition & 1 deletion script/install/upgrade/upgrade.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion support/filecopy/copy_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestExampleCopy5g(t *testing.T) {
// go test -run TestExampleCopy10g -v ./support/filecopy
func TestExampleCopy10g(t *testing.T) {
checkSkip(t)
// on windows this took 4.79s
// on Windows this took 4.79s
testCopyDir(t, "go1.22.1", 10)
}

Expand Down
2 changes: 1 addition & 1 deletion test/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func linkRuntimeAndTest(testDir string, goModOnly bool) (rootDir string, subDir
return "", "", err
}

// windows no link
// Windows no link
if runtime.GOOS != "windows" {
// copy runtime to a tmp directory, and
// test under there
Expand Down
2 changes: 1 addition & 1 deletion tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Usage:
```sh
./with-go-devel ./debug.sh build -v -gcflags \"all=-N -l\" -o ./test_trap.bin ./test/test_trap
```
Or just use the vscode launch config `Launch test_trap`.
Or just use the VS Code launch config `Launch test_trap`.


Example:
Expand Down

0 comments on commit 19affb0

Please sign in to comment.