Skip to content

Commit

Permalink
Remove unneeded local variables
Browse files Browse the repository at this point in the history
  • Loading branch information
RadhiFadlillah committed Sep 21, 2019
1 parent 7e16b02 commit 0bf5772
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 22 deletions.
18 changes: 0 additions & 18 deletions internal/cmd/root.go
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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{
Expand Down
2 changes: 0 additions & 2 deletions internal/webserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import (
_ "github.com/shurcooL/vfsgen"
)

var dataDir = "dev-data"

func main() {
err := cmd.ShioriCmd().Execute()
if err != nil {
Expand Down

0 comments on commit 0bf5772

Please sign in to comment.