golint fixes

This commit is contained in:
dm
2016-02-22 00:15:21 -08:00
parent 57060e494c
commit c757efb8f8
+4 -4
View File
@@ -32,11 +32,11 @@ func TransposeSplit(input string) string {
first := input[:length/2] first := input[:length/2]
second := input[length/2:] second := input[length/2:]
if length%2 == 0 { if length%2 == 0 {
for i, _ := range first { for i := range first {
split += string(first[i]) + string(second[i]) split += string(first[i]) + string(second[i])
} }
} else { } else {
for i, _ := range first { for i := range first {
split += string(first[i]) + string(second[i]) split += string(first[i]) + string(second[i])
} }
split += string(second[len(second)-1]) split += string(second[len(second)-1])
@@ -50,11 +50,11 @@ func DeTransposeRailFence(input string) string {
first := input[:length/2] first := input[:length/2]
second := input[length/2:] second := input[length/2:]
if length%2 == 0 { if length%2 == 0 {
for i, _ := range first { for i := range first {
derf += string(first[i]) + string(second[i]) derf += string(first[i]) + string(second[i])
} }
} else { } else {
for i, _ := range first { for i := range first {
derf += string(first[i]) + string(second[i+1]) derf += string(first[i]) + string(second[i+1])
} }
derf += string(second[0]) derf += string(second[0])