Skip to content

Commit

Permalink
remove tests config
Browse files Browse the repository at this point in the history
  • Loading branch information
coderj001 committed Feb 7, 2023
1 parent 03af2ab commit d8575a6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 59 deletions.
45 changes: 0 additions & 45 deletions .github/workflows/tests.yml

This file was deleted.

2 changes: 1 addition & 1 deletion src/app/urlparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (p Param) getFullURL() string {
return src.BASE_CONFIG.GetURL(p.String())
}

func GetFullURL(page int, categories string, purity string, sorting string, color string, query string) (string, error) {
func GetFullURL(page int, categories, purity, sorting, color, query string) (string, error) {
params := Param{
Page: page,
CTage: src.CTAGS[categories],
Expand Down
3 changes: 2 additions & 1 deletion src/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"fmt"
"os"

"github.com/coderj001/go-wallheven/src/app"
"github.com/spf13/cobra"

"github.com/coderj001/go-wallheven/src/app"
)

var (
Expand Down
15 changes: 3 additions & 12 deletions src/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ package src
import (
"fmt"
"os"
"strconv"

"github.com/joho/godotenv"
)

type Config struct {
APIURL string
APIKEY string
DIR string
NUMGOROUTINES int
APIURL string
APIKEY string
DIR string
}

// Base Config
Expand Down Expand Up @@ -99,12 +97,6 @@ func init() {
BASE_CONFIG.DIR = "./tmp"
} else {
BASE_CONFIG.DIR = os.Getenv("DIR")

}
if os.Getenv("NUMGOROUTINES") == "" {
BASE_CONFIG.NUMGOROUTINES = 5
} else {
BASE_CONFIG.NUMGOROUTINES, _ = strconv.Atoi(os.Getenv("NUMGOROUTINES"))
}
}

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

func (c Config) GetURL(query string) string {
return c.getAPIKey() + query

}

0 comments on commit d8575a6

Please sign in to comment.