Skip to content

Commit 78f7fc8

Browse files
committed
Add buildinfo argument.
1 parent 6230ef8 commit 78f7fc8

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

README.MD

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,16 @@ $
305305
```
306306

307307

308+
### `buildinfo`
309+
310+
Print the build information, then shut down immediately. Example:
311+
312+
```console
313+
$ nvdaRemoteServer buildinfo
314+
This application was compiled with go1.20.1. It was compiled for the amd64 architecture and the linux operating system.
315+
```
316+
317+
308318
# Extra Features
309319

310320
This server has a few extra features that the official addon and server do not support at the moment. This list is subject to change as the addon changes.

buildInfo.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package main
2+
3+
import "runtime"
4+
5+
func buildInfo() string {
6+
return "This application was compiled with " + runtime.Version() + ". It was compiled for the " + runtime.GOARCH + " architecture and the " + runtime.GOOS + " operating system."
7+
}

nvdaRemoteServer.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ func args() {
6262
case "version":
6363
fmt.Println(Version)
6464
os.Exit(0)
65+
case "buildinfo":
66+
fmt.Println(buildInfo())
67+
os.Exit(0)
6568
default:
6669
return
6770
}

0 commit comments

Comments
 (0)