From da29806f5b70ad69f35f13566768252e4d6588af Mon Sep 17 00:00:00 2001 From: Jeremy Clerc Date: Wed, 15 Feb 2017 14:48:45 +0100 Subject: [PATCH] Example readme, make localhost a link. Adjust import orders in example file. --- example/client-auth/README.md | 4 ++-- example/client-auth/client-auth.go | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/example/client-auth/README.md b/example/client-auth/README.md index 44d0d50..c11fe06 100644 --- a/example/client-auth/README.md +++ b/example/client-auth/README.md @@ -52,8 +52,8 @@ Run nginx: docker run --rm -v $PWD/conf.d:/etc/nginx/conf.d -p 8080:443 nginx ``` -Open you browser at https://localhost:8080, and you should see "Welcome to -nginx!". +Open you browser at [https://localhost:8080](https://localhost:8080), +and you should see "Welcome to nginx!". Try to remove your client certificate from your browser and you get 400 bad request. diff --git a/example/client-auth/client-auth.go b/example/client-auth/client-auth.go index c877fbb..8b1e4bf 100644 --- a/example/client-auth/client-auth.go +++ b/example/client-auth/client-auth.go @@ -1,16 +1,14 @@ package main import ( + "crypto/x509" + "crypto/x509/pkix" "encoding/pem" "flag" "io/ioutil" "log" - "time" - "os" - - "crypto/x509" - "crypto/x509/pkix" + "time" "github.com/boltdb/bolt" "github.com/go-yaml/yaml"