mirror of
https://github.com/ubuntu/GoWSL.git
synced 2025-10-26 12:04:50 +01:00
No description
(reopening because I merged on top of the wrong branch 🙈 )
In the GoWSL mock.
That's needed in some test code outside of this repo.
I have this in an ongoing PR in UP4W and need this fix to move forward:
```
--- FAIL: TestDatabaseGetUnmanaged (0.00s)
--- FAIL: TestDatabaseGetUnmanaged/empty_database (0.00s)
panic: WslLaunch command not supported: hostname [recovered]
panic: WslLaunch command not supported: hostname
goroutine 21 [running]:
testing.tRunner.func1.2({0xd84d40, 0xc000332480})
/usr/lib/go-1.24/src/testing/testing.go:1734 +0x3eb
testing.tRunner.func1()
/usr/lib/go-1.24/src/testing/testing.go:1737 +0x696
panic({0xd84d40?, 0xc000332480?})
/usr/lib/go-1.24/src/runtime/panic.go:792 +0x132
github.com/ubuntu/gowsl/mock.newMockedCommand({0xe862d3, 0x8})
/home/.../go/pkg/mod/github.com/ubuntu/gowsl@v0.0.0-20250220202122-f4267f82434b/mock/command.go:34 +0x165
github.com/ubuntu/gowsl/mock.(*Backend).WslLaunch...
```
|
||
|---|---|---|
| .github | ||
| examples | ||
| internal | ||
| mock | ||
| .gitignore | ||
| .golangci.yaml | ||
| backend_mock.go | ||
| backend_real.go | ||
| CONTRIBUTING.md | ||
| coverage.ps1 | ||
| distro.go | ||
| distro_test.go | ||
| doc.go | ||
| exec.go | ||
| exec_test.go | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| main_test.go | ||
| README.md | ||
| registration.go | ||
| registration_test.go | ||
| shell.go | ||
| shell_test.go | ||
| utils_cleanup_linux_test.go | ||
| utils_cleanup_mock_test.go | ||
| utils_cleanup_windows_test.go | ||
| utils_mock_test.go | ||
| utils_real_test.go | ||
| utils_test.go | ||
GoWSL
This module offers an idiomatic interface between your Go code and the Windows Subsystem for Linux (WSL) API (wslApi.dll and occasionally wsl.exe). It offers wrappers around common actions to manage WSL distros.
Aim
We aim not to extend the aforementioned API, but rather to provide a safe, idiomatic, and easy-to-use wrapper around it. The goal is to enable the development of applications that build on top of it.
Requirements
- Windows Subsystem for Linux must be installed (documentation) and enabled.
- Go version must be equal to or above 1.20.
Development
Your help would be very much appreciated! Check out the CONTRIBUTING document to see how you could collaborate.
Contact
You are welcome to create a new issue on this repository if you find bugs or wish to make any feature request.