gototp.go
func (totp *TOTP) QRCodeData(label string) string {
	// We need to URL Escape the label, but at the same time, spaces come through
	// as +'s, so we need to reverse that encoding...
	label = url.QueryEscape(label)
	label = strings.Replace(label, "+", " ", -1)
	return fmt.Sprintf("otpauth://totp/%v?secret=%v&Digits=%v&Period=%v", label, totp.Secret(), totp.Digits, totp.Period)
}
func (totp *TOTP) QRCodeData(label string) string {
	// We need to URL Escape the label, but at the same time, spaces come through
	// as +'s, so we need to reverse that encoding...
	label = url.QueryEscape(label)
	label = strings.Replace(label, "+", " ", -1)
	return fmt.Sprintf("otpauth://totp/%v?secret=%v&Digits=%v&Period=%v", label, totp.Secret(), totp.Digits, totp.Period)
}
func ( totp * TOTP ) QRCodeData ( label string ) string { // We need to URL Escape the label, but at the same time, spaces come through // as +'s, so we need to reverse that encoding... label = url . QueryEscape ( label ) label = strings . Replace ( label , " " , " " , - 1 ) return fmt . Sprintf ( " " , label , totp . Secret ( ) , totp . Digits , totp . Period ) }
// Return the data to be contained in a QR Code for this TOTP with the given label.
Return the data to be contained in a QR Code for this TOTP with the given label .