From e8ec939748c3e3fc474b8b2dec9f407d985efd0c Mon Sep 17 00:00:00 2001 From: Avindra Goolcharan Date: Sat, 11 Mar 2023 17:04:58 -0500 Subject: [PATCH] Update README.md * add syntax highlight to code snippets * fix CI badge markup --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 90d469e..a46294f 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ yubikey ======= -[![Build Status](https://travis-ci.org/conformal/yubikey.png?branch=master)] -(https://travis-ci.org/conformal/yubikey) +[![Build Status](https://travis-ci.org/conformal/yubikey.png?branch=master)](https://travis-ci.org/conformal/yubikey) Package yubikey implements the [Yubico](http://www.yubico.com) [YubiKey](http://www.yubico.com/products/yubikey-hardware/) API. @@ -12,7 +11,7 @@ The package needs to know the secret key of the YubiKey token; this may be stored as a string. For example, the secret key could be loaded from a file with: -``` +```go import ( "bytes" "encoding/hex" @@ -45,7 +44,7 @@ func LoadSecretKey(filename string) (*Key, error) { Then, you can pass the OTP string directly from the YubiKey to `ParseOTPString`: -``` +```go func GetToken(otpString string, priv *Key) (*Token, error) { pub, otp, err := yubikey.ParseOTPString(otpString) if err != nil {