Skip to content

Commit d8575a6

Browse files
committed
remove tests config
1 parent 03af2ab commit d8575a6

File tree

4 files changed

+6
-59
lines changed

4 files changed

+6
-59
lines changed

.github/workflows/tests.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/app/urlparser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (p Param) getFullURL() string {
7373
return src.BASE_CONFIG.GetURL(p.String())
7474
}
7575

76-
func GetFullURL(page int, categories string, purity string, sorting string, color string, query string) (string, error) {
76+
func GetFullURL(page int, categories, purity, sorting, color, query string) (string, error) {
7777
params := Param{
7878
Page: page,
7979
CTage: src.CTAGS[categories],

src/cmd/root.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import (
44
"fmt"
55
"os"
66

7-
"github.com/coderj001/go-wallheven/src/app"
87
"github.com/spf13/cobra"
8+
9+
"github.com/coderj001/go-wallheven/src/app"
910
)
1011

1112
var (

src/config.go

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@ package src
33
import (
44
"fmt"
55
"os"
6-
"strconv"
76

87
"github.com/joho/godotenv"
98
)
109

1110
type Config struct {
12-
APIURL string
13-
APIKEY string
14-
DIR string
15-
NUMGOROUTINES int
11+
APIURL string
12+
APIKEY string
13+
DIR string
1614
}
1715

1816
// Base Config
@@ -99,12 +97,6 @@ func init() {
9997
BASE_CONFIG.DIR = "./tmp"
10098
} else {
10199
BASE_CONFIG.DIR = os.Getenv("DIR")
102-
103-
}
104-
if os.Getenv("NUMGOROUTINES") == "" {
105-
BASE_CONFIG.NUMGOROUTINES = 5
106-
} else {
107-
BASE_CONFIG.NUMGOROUTINES, _ = strconv.Atoi(os.Getenv("NUMGOROUTINES"))
108100
}
109101
}
110102

@@ -120,5 +112,4 @@ func (c Config) getAPIKey() string {
120112

121113
func (c Config) GetURL(query string) string {
122114
return c.getAPIKey() + query
123-
124115
}

0 commit comments

Comments
 (0)