mirror of
https://github.com/bettercap/bettercap
synced 2025-07-31 12:10:10 -07:00
refact: minor refactoring
This commit is contained in:
parent
1913a88c59
commit
01bf914cd4
2 changed files with 4 additions and 3 deletions
2
Makefile
2
Makefile
|
@ -20,7 +20,7 @@ build_file: resources
|
||||||
@echo " BuildDate = \"$(BUILD_DATE)\"" >> $(BUILD_FILE)
|
@echo " BuildDate = \"$(BUILD_DATE)\"" >> $(BUILD_FILE)
|
||||||
@echo ")" >> $(BUILD_FILE)
|
@echo ")" >> $(BUILD_FILE)
|
||||||
|
|
||||||
resources: deps
|
resources:
|
||||||
@echo "@ Compiling resources into go files ..."
|
@echo "@ Compiling resources into go files ..."
|
||||||
@go-bindata -o net/oui_compiled.go -pkg net net/oui.dat
|
@go-bindata -o net/oui_compiled.go -pkg net net/oui.dat
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,9 @@ func (env *Environment) Set(name, value string) string {
|
||||||
old, _ := env.storage[name]
|
old, _ := env.storage[name]
|
||||||
env.storage[name] = value
|
env.storage[name] = value
|
||||||
|
|
||||||
if len(name) > env.Padding {
|
width := len(name)
|
||||||
env.Padding = len(name)
|
if width > env.Padding {
|
||||||
|
env.Padding = width
|
||||||
}
|
}
|
||||||
|
|
||||||
return old
|
return old
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue