Use go modules

This commit is contained in:
Pijus Kamandulis
2020-04-12 03:22:00 +03:00
parent 0a08f62dfe
commit 70c3faf17e
28 changed files with 92 additions and 68 deletions

View File

@@ -1,10 +1,10 @@
package utils
import (
models "../models"
config "../models/config"
fileio "./fileio"
log "./log"
models "github.com/pikami/tiktok-dl/models"
config "github.com/pikami/tiktok-dl/models/config"
fileio "github.com/pikami/tiktok-dl/utils/fileio"
log "github.com/pikami/tiktok-dl/utils/log"
)
// IsItemInArchive - Checks if the item is already archived

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"os"
checkErr "./checkErr"
checkErr "github.com/pikami/tiktok-dl/utils/checkErr"
)
// DownloadFile - Downloads content from `url` and stores it in `outputPath`

View File

@@ -5,7 +5,7 @@ import (
"io/ioutil"
"os"
checkErr "../checkErr"
checkErr "github.com/pikami/tiktok-dl/utils/checkErr"
)
type delegateString func(string)

View File

@@ -1,9 +1,10 @@
package utils
import (
res "../resources"
"fmt"
"strings"
res "github.com/pikami/tiktok-dl/resources"
)
// GetHashtagFromURL - Get's tag name from passed url

View File

@@ -1,11 +1,12 @@
package utils
import (
config "../models/config"
res "../resources"
"fmt"
"regexp"
"strings"
config "github.com/pikami/tiktok-dl/models/config"
res "github.com/pikami/tiktok-dl/resources"
)
// GetUsername - Get's username from passed URL param

View File

@@ -1,9 +1,10 @@
package utils
import (
config "../models/config"
testUtil "../unitTestUtil"
"testing"
config "github.com/pikami/tiktok-dl/models/config"
testUtil "github.com/pikami/tiktok-dl/unitTestUtil"
)
func TestGetUsername(t *testing.T) {

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"os"
config "../../models/config"
config "github.com/pikami/tiktok-dl/models/config"
)
// Log - Write to std out

View File

@@ -3,7 +3,7 @@ package utils
import (
"io/ioutil"
checkErr "./checkErr"
checkErr "github.com/pikami/tiktok-dl/utils/checkErr"
)
// ReadFileAsString - Returns contents of given file