Skip to content

Commit

Permalink
enhance/merge-config
Browse files Browse the repository at this point in the history
  • Loading branch information
Hisyam Mahmud committed Oct 7, 2021
1 parent f8cab77 commit 3906760
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 383 deletions.
7 changes: 0 additions & 7 deletions .env.example

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.env
/vendor
wappin
159 changes: 0 additions & 159 deletions access_token.go

This file was deleted.

47 changes: 0 additions & 47 deletions access_token_test.go

This file was deleted.

7 changes: 4 additions & 3 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package wappin

import (
"github.com/joho/godotenv"
"os"
)

var (
Expand All @@ -13,10 +12,12 @@ var (
func init() {
loadEnv()

baseUrl = os.Getenv("WAPPIN_BASE_URL")
clientId = os.Getenv("WAPPIN_CLIENT_ID")
}

func NewConfig(bURL string, clID string){
baseUrl = bURL
clientId = clID
}

func loadEnv() {
err := godotenv.Load()
Expand Down
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module github.com/flip-id/wappin

go 1.13
go 1.14

require (
github.com/eko/gocache v1.0.0
github.com/go-redis/redis/v7 v7.0.0-beta.5
github.com/go-resty/resty/v2 v2.1.0
github.com/jarcoal/httpmock v1.0.4
github.com/joho/godotenv v1.3.0
github.com/sirupsen/logrus v1.4.2
github.com/stretchr/testify v1.4.0
github.com/go-resty/resty/v2 v2.6.0
github.com/jarcoal/httpmock v1.0.8
github.com/joho/godotenv v1.4.0
github.com/kr/pretty v0.1.0 // indirect
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.7.0
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
)
Loading

0 comments on commit 3906760

Please sign in to comment.