Skip to content

Commit 739acee

Browse files
committed
rm dead global vars
1 parent 59329f2 commit 739acee

File tree

5 files changed

+2
-17
lines changed

5 files changed

+2
-17
lines changed

models/user.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ const (
7676
)
7777

7878
var (
79-
// ErrUserNotKeyOwner user does not own this key error
80-
ErrUserNotKeyOwner = errors.New("User does not own this public key")
81-
8279
// ErrEmailNotExist e-mail does not exist error
8380
ErrEmailNotExist = errors.New("E-mail does not exist")
8481

modules/process/manager.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ package process
88
import (
99
"bytes"
1010
"context"
11-
"errors"
1211
"fmt"
1312
"io"
1413
"os/exec"
@@ -22,10 +21,8 @@ import (
2221
// then we delete the singleton.
2322

2423
var (
25-
// ErrExecTimeout represent a timeout error
26-
ErrExecTimeout = errors.New("Process execution timeout")
27-
manager *Manager
28-
managerInit sync.Once
24+
manager *Manager
25+
managerInit sync.Once
2926

3027
// DefaultContext is the default context to run processing commands in
3128
DefaultContext = context.Background()

modules/setting/setting.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ var (
318318
LogRootPath string
319319
DisableRouterLog bool
320320
RouterLogLevel log.Level
321-
RouterLogMode string
322321
EnableAccessLog bool
323322
AccessLogTemplate string
324323
EnableXORMLog bool
@@ -408,10 +407,6 @@ var (
408407
IsWindows bool
409408
HasRobotsTxt bool
410409
InternalToken string // internal access token
411-
412-
// UILocation is the location on the UI, so that we can display the time on UI.
413-
// Currently only show the default time.Local, it could be added to app.ini after UI is ready
414-
UILocation = time.Local
415410
)
416411

417412
// IsProd if it's a production mode

modules/storage/storage.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ import (
1919
var (
2020
// ErrURLNotSupported represents url is not supported
2121
ErrURLNotSupported = errors.New("url method not supported")
22-
// ErrIterateObjectsNotSupported represents IterateObjects not supported
23-
ErrIterateObjectsNotSupported = errors.New("iterateObjects method not supported")
2422
)
2523

2624
// ErrInvalidConfiguration is called when there is invalid configuration for a storage

routers/repo/issue.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ const (
5252
)
5353

5454
var (
55-
// ErrTooManyFiles upload too many files
56-
ErrTooManyFiles = errors.New("Maximum number of files to upload exceeded")
5755
// IssueTemplateCandidates issue templates
5856
IssueTemplateCandidates = []string{
5957
"ISSUE_TEMPLATE.md",

0 commit comments

Comments
 (0)