mirror of
https://github.com/go-shiori/shiori.git
synced 2024-09-20 15:06:14 +08:00
Remove unneeded local variables
This commit is contained in:
parent
7e16b020d6
commit
0bf5772022
|
@ -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{
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue