lint driven refactoring

This commit is contained in:
evilsocket 2018-04-24 16:33:38 +02:00
parent bc3be7dd2b
commit 7919cda5ec
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
12 changed files with 45 additions and 49 deletions

View file

@ -199,7 +199,7 @@ func (s *ProxyScript) defineBuiltins() error {
if argc == 1 {
// get
varName := call.Argument(0).String()
if found, varValue := s.sess.Env.Get(varName); found == true {
if found, varValue := s.sess.Env.Get(varName); found {
v, err := s.VM.ToValue(varValue)
if err != nil {
return errOtto("Could not convert to string: %s", varValue)
@ -228,7 +228,7 @@ func (s *ProxyScript) hasCallback(name string) bool {
// check the cache
has, found := s.cbCache[name]
if found == false {
if !found {
// check the VM
cb, err := s.VM.Get(name)
if err == nil && cb.IsFunction() {