Skip to content

Commit 7d94d3d

Browse files
committed
Dev: minor comment fix, github shields
1 parent 1c64094 commit 7d94d3d

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# WG Commander
22

33
aka "wg-cmd" — TUI for managing WireGuard configuration files
4+
5+
<a href="https://github.com/andrianbdn/wg-cmd/releases/latest"><img src="https://img.shields.io/github/v/release/andrianbdn/wg-cmd" /></a>
6+
<a href="./LICENSE"><img src="https://img.shields.io/github/license/andrianbdn/wg-cmd" /></a>
7+
<a href="./go.mod"><img src="https://img.shields.io/github/go-mod/go-version/andrianbdn/wg-cmd" /></a>
8+
[![Go Report Card](https://goreportcard.com/badge/github.com/andrianbdn/wg-cmd)](https://goreportcard.com/report/github.com/andrianbdn/wg-cmd)
9+
410
![screenshot](https://user-images.githubusercontent.com/994900/218720566-e5b3ab22-d7fc-4df7-a777-ad9b6280ada8.png)
511

612
# Features

app/app.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (a *App) RunCli() {
5757
fmt.Println("Error making Wireguard config:", err)
5858
os.Exit(1)
5959
}
60-
fmt.Printf("Successfuly wrote Wireguard config to %s\n", path)
60+
fmt.Printf("Successfully wrote Wireguard config to %s\n", path)
6161
os.Exit(0)
6262
}
6363
}

backend/server.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,8 @@ func (s *Server) WriteInterfaceBlock(w io.Writer, writeComment bool) error {
191191

192192
comment := ""
193193
if writeComment {
194-
wd, err := os.Getwd()
195-
if err != nil {
196-
panic("can't os.Getwd " + err.Error())
197-
}
198-
comment := "# This file is generated by WG Commander from directory " + wd + "\n"
199-
comment += "# It it likely to be overwritten.\n\n"
194+
comment = "# This file is generated by WG Commander\n" +
195+
"# It it likely to be overwritten.\n\n"
200196
}
201197

202198
_, err := fmt.Fprintf(w, "%s[Interface]\n", comment)

backend/testdata/wg3.conf.golden

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# This file is generated by WG Commander
2+
# It it likely to be overwritten.
3+
14
[Interface]
25
Address = 10.72.144.1/20
36
Address = fd7b:7e45:5bf7::1/64

0 commit comments

Comments
 (0)