tExplode with usage() if argv < 2. - tlstun - simple go program to add tls support to other listeners
HTML git clone https://git.parazyd.org/tlstun
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 7b2354eb63c673ed6db6c8886233edac31e6ed27
DIR parent fc4cf991deec0f01dbc520075e32e201e504071d
HTML Author: parazyd <parazyd@dyne.org>
Date: Wed, 10 Jul 2019 01:52:06 +0200
Explode with usage() if argv < 2.
Diffstat:
M tlstun.go | 4 ++++
1 file changed, 4 insertions(+), 0 deletions(-)
---
DIR diff --git a/tlstun.go b/tlstun.go
t@@ -119,6 +119,10 @@ func server() (net.Listener, error) {
func main() {
flag.Parse()
+ if len(os.Args < 2) {
+ flag.Usage()
+ }
+
if *client {
if _, err := os.Stat(*cacert); os.IsNotExist(err) {
log.Fatal("Cannot find CA certificate.")