REFACTOR: Rename go module to 'gitlab.com/offline-twitter/twitter_offline_engine' in accordance with 'go get' conventions
- also restructure project to use a 'pkg' directory for reusable packages
This commit is contained in:
parent
c61d9fad1c
commit
a061decd0f
@ -6,8 +6,8 @@ import (
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"offline_twitter/scraper"
|
||||
"offline_twitter/terminal_utils"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/terminal_utils"
|
||||
)
|
||||
|
||||
/**
|
||||
|
@ -9,8 +9,8 @@ import (
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"offline_twitter/persistence"
|
||||
"offline_twitter/scraper"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/persistence"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
/**
|
||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
||||
module offline_twitter
|
||||
module gitlab.com/offline-twitter/twitter_offline_engine
|
||||
|
||||
go 1.16
|
||||
|
||||
|
@ -3,7 +3,7 @@ package persistence
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"offline_twitter/scraper"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
func (p Profile) SaveLike(l scraper.Like) error {
|
@ -10,7 +10,7 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"offline_twitter/scraper"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
type MediaDownloader interface {
|
@ -6,7 +6,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"offline_twitter/scraper"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
/**
|
@ -3,7 +3,7 @@ package persistence
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"offline_twitter/scraper"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
/**
|
@ -9,7 +9,7 @@ import (
|
||||
"github.com/go-test/deep"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"offline_twitter/scraper"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
/**
|
@ -9,7 +9,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"offline_twitter/persistence"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/persistence"
|
||||
)
|
||||
|
||||
// DUPE 1
|
@ -3,7 +3,7 @@ package persistence
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"offline_twitter/scraper"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
/**
|
@ -2,7 +2,7 @@ package persistence
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"offline_twitter/scraper"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
"os"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
@ -2,10 +2,10 @@ package persistence_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"net/http/cookiejar"
|
||||
"offline_twitter/scraper"
|
||||
"testing"
|
||||
"time"
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"database/sql"
|
||||
"errors"
|
||||
"fmt"
|
||||
"offline_twitter/scraper"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
type SpaceParticipant struct {
|
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"offline_twitter/scraper"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
|
||||
"github.com/go-test/deep"
|
||||
"math/rand"
|
@ -5,7 +5,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"offline_twitter/scraper"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
func (p Profile) SaveTweet(t scraper.Tweet) error {
|
@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/go-test/deep"
|
||||
|
||||
"offline_twitter/scraper"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
/**
|
@ -3,7 +3,7 @@ package persistence
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
. "offline_twitter/scraper"
|
||||
. "gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
/**
|
@ -6,7 +6,7 @@ import (
|
||||
"fmt"
|
||||
"path"
|
||||
|
||||
"offline_twitter/scraper"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
/**
|
@ -11,7 +11,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"offline_twitter/scraper"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
/**
|
@ -5,8 +5,8 @@ import (
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
"offline_twitter/persistence"
|
||||
"offline_twitter/scraper"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/persistence"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
/**
|
@ -5,7 +5,7 @@ import (
|
||||
|
||||
sql "github.com/jmoiron/sqlx"
|
||||
|
||||
"offline_twitter/terminal_utils"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/terminal_utils"
|
||||
)
|
||||
|
||||
type VersionMismatchError struct {
|
@ -7,8 +7,8 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"offline_twitter/persistence"
|
||||
"offline_twitter/scraper"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/persistence"
|
||||
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
func TestVersionUpgrade(t *testing.T) {
|
@ -8,7 +8,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
. "offline_twitter/scraper"
|
||||
. "gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
func TestParseSpaceResponse(t *testing.T) {
|
@ -8,7 +8,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
. "offline_twitter/scraper"
|
||||
. "gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
func TestNormalizeContent(t *testing.T) {
|
@ -8,7 +8,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
. "offline_twitter/scraper"
|
||||
. "gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
/**
|
@ -12,7 +12,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
. "offline_twitter/scraper"
|
||||
. "gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
// An API object should serialize and then deserialize to give the same session state from before.
|
@ -7,7 +7,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
. "offline_twitter/scraper"
|
||||
. "gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
// Makes an HTTP request
|
@ -8,7 +8,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
. "offline_twitter/scraper"
|
||||
. "gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
func TestParseAPIMedia(t *testing.T) {
|
@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
. "offline_twitter/scraper"
|
||||
. "gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
func TestExpandShortUrl(t *testing.T) {
|
@ -8,7 +8,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
. "offline_twitter/scraper"
|
||||
. "gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
func TestParsePoll2Choices(t *testing.T) {
|
@ -8,7 +8,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
. "offline_twitter/scraper"
|
||||
. "gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
func TestParseSingleRetweet(t *testing.T) {
|
@ -8,7 +8,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
. "offline_twitter/scraper"
|
||||
. "gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||
)
|
||||
|
||||
func TestParseSpace(t *testing.T) {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user