Browse code

Fix some inefassign warnings

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

Kir Kolyshkin authored on 2019/08/06 12:05:09
Showing 2 changed files
... ...
@@ -38,7 +38,7 @@ func byteSizeFromString(arg string) (int64, error) {
38 38
 
39 39
 	rest = strings.ToLower(strings.TrimSpace(rest))
40 40
 
41
-	var multiplier int64 = 1
41
+	var multiplier int64
42 42
 	switch rest {
43 43
 	case "":
44 44
 		multiplier = 1
... ...
@@ -637,7 +637,7 @@ func parsePortMap(portMap nat.PortMap) ([]*api.PortConfig, error) {
637 637
 			return nil, err
638 638
 		}
639 639
 
640
-		protocol := api.ProtocolTCP
640
+		var protocol api.PortConfig_Protocol
641 641
 		switch strings.ToLower(parts[1]) {
642 642
 		case "tcp":
643 643
 			protocol = api.ProtocolTCP