Skip to content

Commit 90f3dae

Browse files
Update readme to include GOEXPERIMENT jsonv2 for building from source
1 parent 34627cc commit 90f3dae

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,37 @@ sudo ln -s /opt/2ms/2ms /usr/local/bin/2ms
6868

6969
## Compile from source
7070

71+
> Requires Go 1.23+ and `GOEXPERIMENT=jsonv2` set in your build environment.
72+
7173
You can compile the project from its source using the following commands:
7274

7375
```bash
76+
# Linux/macOS (bash/zsh)
7477
git clone https://github.com/checkmarx/2ms.git
7578
cd 2ms
79+
export GOEXPERIMENT=jsonv2
7680
go build -o dist/2ms main.go
7781
./dist/2ms
7882
```
7983

84+
```powershell
85+
# Windows (PowerShell)
86+
git clone https://github.com/checkmarx/2ms.git
87+
cd 2ms
88+
$env:GOEXPERIMENT = "jsonv2"
89+
go build -o dist\2ms.exe main.go
90+
.\dist\2ms.exe
91+
```
92+
93+
```cmd
94+
:: Windows (CMD)
95+
git clone https://github.com/checkmarx/2ms.git
96+
cd 2ms
97+
set GOEXPERIMENT=jsonv2
98+
go build -o dist\2ms.exe main.go
99+
.\dist\2ms.exe
100+
```
101+
80102
## Run From Docker Container
81103

82104
We publish container image releases of `2ms` to [checkmarx/2ms](https://hub.docker.com/r/checkmarx/2ms) .

0 commit comments

Comments
 (0)