Remove unneeded local variables

This commit is contained in:
Radhi Fadlillah 2019-09-21 16:19:45 +07:00
parent 7e16b020d6
commit 0bf5772022
3 changed files with 0 additions and 22 deletions

View file

@ -1,12 +1,8 @@
package cmd
import (
"crypto/tls"
"net/http"
"net/http/cookiejar"
"os"
fp "path/filepath"
"time"
"github.com/go-shiori/shiori/internal/database"
apppaths "github.com/muesli/go-app-paths"
@ -16,23 +12,9 @@ import (
var (
db database.DB
dataDir string
httpClient *http.Client
developmentMode bool
)
func init() {
jar, _ := cookiejar.New(nil)
httpClient = &http.Client{
Timeout: time.Minute,
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
},
},
Jar: jar,
}
}
// ShioriCmd returns the root command for shiori
func ShioriCmd() *cobra.Command {
rootCmd := &cobra.Command{

View file

@ -12,8 +12,6 @@ import (
"github.com/sirupsen/logrus"
)
var httpClient = &http.Client{Timeout: time.Minute}
// ServeApp serves wb interface in specified port
func ServeApp(DB database.DB, dataDir string, address string, port int) error {
// Create handler

View file

@ -14,8 +14,6 @@ import (
_ "github.com/shurcooL/vfsgen"
)
var dataDir = "dev-data"
func main() {
err := cmd.ShioriCmd().Execute()
if err != nil {