From 01bf914cd4ed9764c334f0b4247a0d875655fc22 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Mon, 8 Jan 2018 00:36:55 +0100 Subject: [PATCH] refact: minor refactoring --- Makefile | 2 +- session/environment.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 61854303..fe434e4f 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ build_file: resources @echo " BuildDate = \"$(BUILD_DATE)\"" >> $(BUILD_FILE) @echo ")" >> $(BUILD_FILE) -resources: deps +resources: @echo "@ Compiling resources into go files ..." @go-bindata -o net/oui_compiled.go -pkg net net/oui.dat diff --git a/session/environment.go b/session/environment.go index 3344f62b..ac80109c 100644 --- a/session/environment.go +++ b/session/environment.go @@ -39,8 +39,9 @@ func (env *Environment) Set(name, value string) string { old, _ := env.storage[name] env.storage[name] = value - if len(name) > env.Padding { - env.Padding = len(name) + width := len(name) + if width > env.Padding { + env.Padding = width } return old