Use the correct fmt verb for log output

This commit is contained in:
Taliesin Sisson 2016-07-31 19:46:38 +01:00
parent a87ad05866
commit 1155c6d4d6
2 changed files with 24 additions and 24 deletions

View File

@ -153,7 +153,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<leftAltOn>") {
keyCode = special["<leftAlt>"]
original = original[len("<leftAltOn>"):]
log.Printf("Special code '<leftAltOn>' found, replacing with: %s", keyCode)
log.Printf("Special code '<leftAltOn>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, true)
time.Sleep(time.Second / 10)
@ -167,7 +167,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<leftCtrlOn>") {
keyCode = special["<leftCtrlOn>"]
original = original[len("<leftCtrlOn>"):]
log.Printf("Special code '<leftCtrlOn>' found, replacing with: %s", keyCode)
log.Printf("Special code '<leftCtrlOn>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, true)
time.Sleep(time.Second / 10)
@ -181,7 +181,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<leftShiftOn>") {
keyCode = special["<leftShiftOn>"]
original = original[len("<leftShiftOn>"):]
log.Printf("Special code '<leftShiftOn>' found, replacing with: %s", keyCode)
log.Printf("Special code '<leftShiftOn>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, true)
time.Sleep(time.Second / 10)
@ -195,7 +195,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<leftAltOff>") {
keyCode = special["<leftAltOff>"]
original = original[len("<leftAltOff>"):]
log.Printf("Special code '<leftAltOff>' found, replacing with: %s", keyCode)
log.Printf("Special code '<leftAltOff>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, false)
time.Sleep(time.Second / 10)
@ -209,7 +209,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<leftCtrlOff>") {
keyCode = special["<leftCtrlOff>"]
original = original[len("<leftCtrlOff>"):]
log.Printf("Special code '<leftCtrlOff>' found, replacing with: %s", keyCode)
log.Printf("Special code '<leftCtrlOff>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, false)
time.Sleep(time.Second / 10)
@ -223,7 +223,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<leftShiftOff>") {
keyCode = special["<leftShiftOff>"]
original = original[len("<leftShiftOff>"):]
log.Printf("Special code '<leftShiftOff>' found, replacing with: %s", keyCode)
log.Printf("Special code '<leftShiftOff>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, false)
time.Sleep(time.Second / 10)
@ -237,7 +237,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<rightAltOn>") {
keyCode = special["<rightAltOn>"]
original = original[len("<rightAltOn>"):]
log.Printf("Special code '<rightAltOn>' found, replacing with: %s", keyCode)
log.Printf("Special code '<rightAltOn>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, true)
time.Sleep(time.Second / 10)
@ -251,7 +251,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<rightCtrlOn>") {
keyCode = special["<rightCtrlOn>"]
original = original[len("<rightCtrlOn>"):]
log.Printf("Special code '<rightCtrlOn>' found, replacing with: %s", keyCode)
log.Printf("Special code '<rightCtrlOn>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, true)
time.Sleep(time.Second / 10)
@ -265,7 +265,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<rightShiftOn>") {
keyCode = special["<rightShiftOn>"]
original = original[len("<rightShiftOn>"):]
log.Printf("Special code '<rightShiftOn>' found, replacing with: %s", keyCode)
log.Printf("Special code '<rightShiftOn>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, true)
time.Sleep(time.Second / 10)
@ -279,7 +279,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<rightAltOff>") {
keyCode = special["<rightAltOff>"]
original = original[len("<rightAltOff>"):]
log.Printf("Special code '<rightAltOff>' found, replacing with: %s", keyCode)
log.Printf("Special code '<rightAltOff>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, false)
time.Sleep(time.Second / 10)
@ -293,7 +293,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<rightCtrlOff>") {
keyCode = special["<rightCtrlOff>"]
original = original[len("<rightCtrlOff>"):]
log.Printf("Special code '<rightCtrlOff>' found, replacing with: %s", keyCode)
log.Printf("Special code '<rightCtrlOff>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, false)
time.Sleep(time.Second / 10)
@ -307,7 +307,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<rightShiftOff>") {
keyCode = special["<rightShiftOff>"]
original = original[len("<rightShiftOff>"):]
log.Printf("Special code '<rightShiftOff>' found, replacing with: %s", keyCode)
log.Printf("Special code '<rightShiftOff>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, false)
time.Sleep(time.Second / 10)

View File

@ -176,7 +176,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<leftAltOn>") {
keyCode = special["<leftAlt>"]
original = original[len("<leftAltOn>"):]
log.Printf("Special code '<leftAltOn>' found, replacing with: %s", keyCode)
log.Printf("Special code '<leftAltOn>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, true)
time.Sleep(time.Second / 10)
@ -187,7 +187,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<leftCtrlOn>") {
keyCode = special["<leftCtrlOn>"]
original = original[len("<leftCtrlOn>"):]
log.Printf("Special code '<leftCtrlOn>' found, replacing with: %s", keyCode)
log.Printf("Special code '<leftCtrlOn>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, true)
time.Sleep(time.Second / 10)
@ -198,7 +198,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<leftShiftOn>") {
keyCode = special["<leftShiftOn>"]
original = original[len("<leftShiftOn>"):]
log.Printf("Special code '<leftShiftOn>' found, replacing with: %s", keyCode)
log.Printf("Special code '<leftShiftOn>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, true)
time.Sleep(time.Second / 10)
@ -209,7 +209,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<leftAltOff>") {
keyCode = special["<leftAltOff>"]
original = original[len("<leftAltOff>"):]
log.Printf("Special code '<leftAltOff>' found, replacing with: %s", keyCode)
log.Printf("Special code '<leftAltOff>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, false)
time.Sleep(time.Second / 10)
@ -220,7 +220,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<leftCtrlOff>") {
keyCode = special["<leftCtrlOff>"]
original = original[len("<leftCtrlOff>"):]
log.Printf("Special code '<leftCtrlOff>' found, replacing with: %s", keyCode)
log.Printf("Special code '<leftCtrlOff>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, false)
time.Sleep(time.Second / 10)
@ -231,7 +231,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<leftShiftOff>") {
keyCode = special["<leftShiftOff>"]
original = original[len("<leftShiftOff>"):]
log.Printf("Special code '<leftShiftOff>' found, replacing with: %s", keyCode)
log.Printf("Special code '<leftShiftOff>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, false)
time.Sleep(time.Second / 10)
@ -242,7 +242,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<rightAltOn>") {
keyCode = special["<rightAltOn>"]
original = original[len("<rightAltOn>"):]
log.Printf("Special code '<rightAltOn>' found, replacing with: %s", keyCode)
log.Printf("Special code '<rightAltOn>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, true)
time.Sleep(time.Second / 10)
@ -253,7 +253,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<rightCtrlOn>") {
keyCode = special["<rightCtrlOn>"]
original = original[len("<rightCtrlOn>"):]
log.Printf("Special code '<rightCtrlOn>' found, replacing with: %s", keyCode)
log.Printf("Special code '<rightCtrlOn>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, true)
time.Sleep(time.Second / 10)
@ -264,7 +264,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<rightShiftOn>") {
keyCode = special["<rightShiftOn>"]
original = original[len("<rightShiftOn>"):]
log.Printf("Special code '<rightShiftOn>' found, replacing with: %s", keyCode)
log.Printf("Special code '<rightShiftOn>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, true)
time.Sleep(time.Second / 10)
@ -275,7 +275,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<rightAltOff>") {
keyCode = special["<rightAltOff>"]
original = original[len("<rightAltOff>"):]
log.Printf("Special code '<rightAltOff>' found, replacing with: %s", keyCode)
log.Printf("Special code '<rightAltOff>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, false)
time.Sleep(time.Second / 10)
@ -286,7 +286,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<rightCtrlOff>") {
keyCode = special["<rightCtrlOff>"]
original = original[len("<rightCtrlOff>"):]
log.Printf("Special code '<rightCtrlOff>' found, replacing with: %s", keyCode)
log.Printf("Special code '<rightCtrlOff>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, false)
time.Sleep(time.Second / 10)
@ -297,7 +297,7 @@ func vncSendString(c *vnc.ClientConn, original string) {
if strings.HasPrefix(original, "<rightShiftOff>") {
keyCode = special["<rightShiftOff>"]
original = original[len("<rightShiftOff>"):]
log.Printf("Special code '<rightShiftOff>' found, replacing with: %s", keyCode)
log.Printf("Special code '<rightShiftOff>' found, replacing with: %d", keyCode)
c.KeyEvent(keyCode, false)
time.Sleep(time.Second / 10)