fix golint and go vet messages
fix lint messages
support AutoClose