mirror of
https://github.com/go-shiori/shiori.git
synced 2025-01-15 12:27:43 +08:00
Remove unneeded local variables
This commit is contained in:
parent
7e16b020d6
commit
0bf5772022
3 changed files with 0 additions and 22 deletions
|
@ -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
|
||||
|
|
2
main.go
2
main.go
|
@ -14,8 +14,6 @@ import (
|
|||
_ "github.com/shurcooL/vfsgen"
|
||||
)
|
||||
|
||||
var dataDir = "dev-data"
|
||||
|
||||
func main() {
|
||||
err := cmd.ShioriCmd().Execute()
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue