From 818f7465f836687d134c4ac7cea825b86a074855 Mon Sep 17 00:00:00 2001 From: "Iskander (Alex) Sharipov" Date: Mon, 27 Sep 2021 18:34:54 +0300 Subject: [PATCH] fix(underscore): remove unneeded wrapping lambda (#320) Use func value instead of wrapping lambda Found using https://go-critic.github.io/overview.html#unlambda-ref --- underscore/underscore.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/underscore/underscore.go b/underscore/underscore.go index 714b8f3..d5bd0ca 100644 --- a/underscore/underscore.go +++ b/underscore/underscore.go @@ -29,9 +29,7 @@ import ( "github.com/robertkrimen/otto/registry" ) -var entry *registry.Entry = registry.Register(func() string { - return Source() -}) +var entry *registry.Entry = registry.Register(Source) // Enable underscore runtime inclusion. func Enable() {