Skip to content
This repository was archived by the owner on May 2, 2022. It is now read-only.

Commit 257c128

Browse files
committed
move internal packages to .., update scmn-dev/tran module
1 parent 9b55b37 commit 257c128

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+146
-348
lines changed

.dockerignore

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

.goreleaser.yml

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

app/app.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ package app
33
import (
44
"log"
55

6-
"github.com/spf13/cobra"
7-
"github.com/abdfnx/tran/tools"
8-
"github.com/abdfnx/tran/models"
9-
"github.com/abdfnx/tran/constants"
10-
"github.com/abdfnx/tran/internal/tui"
116
"github.com/abdfnx/gh/pkg/cmd/factory"
7+
"github.com/scmn-dev/tran/constants"
8+
"github.com/scmn-dev/tran/models"
9+
"github.com/scmn-dev/tran/tools"
10+
"github.com/scmn-dev/tran/tui"
11+
"github.com/spf13/cobra"
1212
)
1313

1414
var NewSendCmd = &cobra.Command{

app/checker/checker.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import (
44
"fmt"
55
"strings"
66

7-
"github.com/mgutz/ansi"
87
"github.com/abdfnx/looker"
9-
"github.com/abdfnx/tran/api"
10-
"github.com/abdfnx/tran/cmd/factory"
11-
"github.com/abdfnx/tran/internal/config"
8+
"github.com/mgutz/ansi"
9+
"github.com/scmn-dev/tran/api"
10+
"github.com/scmn-dev/tran/cmd/factory"
11+
"github.com/scmn-dev/tran/config"
1212
)
1313

1414
func Check(buildVersion string) {

app/config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
package config
22

33
import (
4-
"fmt"
54
"bytes"
5+
"fmt"
66
"io/ioutil"
77
"path/filepath"
88

99
"github.com/mgutz/ansi"
10+
"github.com/scmn-dev/tran/dfs"
1011
"github.com/spf13/cobra"
1112
"github.com/spf13/viper"
12-
"github.com/abdfnx/tran/dfs"
1313
)
1414

1515
var (

app/sync.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ package app
33
import (
44
"fmt"
55
"log"
6-
"time"
76
"runtime"
7+
"time"
88

9-
"github.com/abdfnx/gosh"
10-
"github.com/spf13/cobra"
9+
"github.com/MakeNowJust/heredoc"
1110
"github.com/abdfnx/gh/utils"
11+
"github.com/abdfnx/gosh"
1212
"github.com/briandowns/spinner"
13-
"github.com/MakeNowJust/heredoc"
14-
"github.com/abdfnx/tran/constants"
1513
git_config "github.com/david-tomson/tran-git"
14+
"github.com/scmn-dev/tran/constants"
15+
"github.com/spf13/cobra"
1616
)
1717

1818
var username = git_config.GitConfig()

cmd/factory/default.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package factory
22

33
import (
4-
"github.com/abdfnx/tran/ios"
4+
"github.com/scmn-dev/tran/ios"
55
)
66

77
type Factory struct {

cmd/tran/help.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package tran
22

33
import (
4-
"fmt"
54
"bytes"
5+
"fmt"
66
"strings"
77

8+
"github.com/scmn-dev/tran/ios"
9+
"github.com/scmn-dev/tran/tools"
810
"github.com/spf13/cobra"
911
"github.com/spf13/pflag"
10-
"github.com/abdfnx/tran/ios"
11-
"github.com/abdfnx/tran/tools"
1212
)
1313

1414
func rootUsageFunc(command *cobra.Command) error {

cmd/tran/root.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import (
44
"fmt"
55
"log"
66

7-
"github.com/spf13/cobra"
8-
"github.com/abdfnx/tran/app"
97
"github.com/MakeNowJust/heredoc"
10-
"github.com/abdfnx/tran/cmd/factory"
11-
"github.com/abdfnx/tran/internal/tui"
12-
"github.com/abdfnx/tran/internal/config"
138
tea "github.com/charmbracelet/bubbletea"
14-
configCmd "github.com/abdfnx/tran/app/config"
9+
"github.com/scmn-dev/tran/app"
10+
configCmd "github.com/scmn-dev/tran/app/config"
11+
"github.com/scmn-dev/tran/cmd/factory"
12+
"github.com/scmn-dev/tran/config"
13+
"github.com/scmn-dev/tran/tui"
14+
"github.com/spf13/cobra"
1515
)
1616

1717
// Execute start the CLI
@@ -45,7 +45,7 @@ func Execute(f *factory.Factory, version string, buildDate string) *cobra.Comman
4545
`),
4646
Annotations: map[string]string{
4747
"help:tellus": heredoc.Doc(`
48-
Open an issue at https://github.com/abdfnx/tran/issues
48+
Open an issue at https://github.com/scmn-dev/tran/issues
4949
`),
5050
},
5151
RunE: func(cmd *cobra.Command, args []string) error {

internal/config/config.go renamed to config/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package config
22

33
import (
4-
"os"
54
"log"
6-
"runtime"
5+
"os"
76
"path/filepath"
7+
"runtime"
88

9+
"github.com/scmn-dev/tran/dfs"
910
"github.com/spf13/pflag"
1011
"github.com/spf13/viper"
11-
"github.com/abdfnx/tran/dfs"
1212
)
1313

1414
// TranConfig struct represents the config for the config.

core/receiver/receive.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package receiver
22

33
import (
4-
"io"
54
"encoding/json"
5+
"io"
66

77
"github.com/gorilla/websocket"
8-
"github.com/abdfnx/tran/tools"
9-
"github.com/abdfnx/tran/models/protocol"
8+
"github.com/scmn-dev/tran/models/protocol"
9+
"github.com/scmn-dev/tran/tools"
1010
)
1111

1212
func (r *Receiver) Receive(wsConn *websocket.Conn, buffer io.Writer) error {

core/receiver/receiver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package receiver
22

33
import (
4-
"github.com/abdfnx/tran/models"
5-
"github.com/abdfnx/tran/core/crypt"
4+
"github.com/scmn-dev/tran/core/crypt"
5+
"github.com/scmn-dev/tran/models"
66
)
77

88
type Receiver struct {

core/receiver/tranx-client.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
package receiver
22

33
import (
4+
"context"
45
"fmt"
56
"net"
67
"time"
7-
"context"
88

9-
"github.com/schollz/pake/v3"
10-
"github.com/abdfnx/tran/tools"
119
"github.com/gorilla/websocket"
12-
"github.com/abdfnx/tran/models"
13-
"github.com/abdfnx/tran/core/crypt"
14-
"github.com/abdfnx/tran/models/protocol"
10+
"github.com/schollz/pake/v3"
11+
"github.com/scmn-dev/tran/core/crypt"
12+
"github.com/scmn-dev/tran/models"
13+
"github.com/scmn-dev/tran/models/protocol"
14+
"github.com/scmn-dev/tran/tools"
1515
)
1616

1717
func (r *Receiver) ConnectToTranx(tranxAddress string, tranxPort int, password models.Password) (*websocket.Conn, error) {

core/sender/sender.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
package sender
22

33
import (
4-
"os"
5-
"io"
64
"fmt"
5+
"io"
76
"net"
8-
"time"
9-
"syscall"
107
"net/http"
8+
"os"
119
"os/signal"
10+
"syscall"
11+
"time"
1212

1313
"github.com/gorilla/websocket"
14-
"github.com/abdfnx/tran/models"
15-
"github.com/abdfnx/tran/core/crypt"
14+
"github.com/scmn-dev/tran/core/crypt"
15+
"github.com/scmn-dev/tran/models"
1616
)
1717

1818
// Sender represents the sender client, handles tranx communication and file transfer.

core/sender/transfer.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
package sender
22

33
import (
4-
"io"
4+
"bufio"
55
"fmt"
6+
"io"
67
"log"
7-
"bufio"
88
"syscall"
99

1010
"github.com/gorilla/websocket"
11-
"github.com/abdfnx/tran/tools"
12-
"github.com/abdfnx/tran/constants"
13-
"github.com/abdfnx/tran/models/protocol"
11+
"github.com/scmn-dev/tran/constants"
12+
"github.com/scmn-dev/tran/models/protocol"
13+
"github.com/scmn-dev/tran/tools"
1414
)
1515

1616
// Transfer is the file transfer sequence, can be via relay or tranx.

core/sender/tranx-client.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import (
44
"fmt"
55
"net"
66

7-
"github.com/schollz/pake/v3"
87
"github.com/gorilla/websocket"
9-
"github.com/abdfnx/tran/tools"
10-
"github.com/abdfnx/tran/models"
11-
"github.com/abdfnx/tran/core/crypt"
12-
"github.com/abdfnx/tran/models/protocol"
8+
"github.com/schollz/pake/v3"
9+
"github.com/scmn-dev/tran/core/crypt"
10+
"github.com/scmn-dev/tran/models"
11+
"github.com/scmn-dev/tran/models/protocol"
12+
"github.com/scmn-dev/tran/tools"
1313
)
1414

1515
// ConnectToTranx, establishes the connection with the tranx server.

core/tranx/handlers.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
package tranx
22

33
import (
4+
"encoding/json"
45
"fmt"
56
"log"
67
"time"
7-
"encoding/json"
88

99
"github.com/gorilla/websocket"
10-
"github.com/abdfnx/tran/tools"
11-
"github.com/abdfnx/tran/constants"
12-
"github.com/abdfnx/tran/models/protocol"
10+
"github.com/scmn-dev/tran/constants"
11+
"github.com/scmn-dev/tran/models/protocol"
12+
"github.com/scmn-dev/tran/tools"
1313
)
1414

1515
// handleEstablishSender returns a websocket handler that communicates with the sender.

core/tranx/mailbox.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"sync"
77

88
"github.com/gorilla/websocket"
9-
"github.com/abdfnx/tran/models/protocol"
9+
"github.com/scmn-dev/tran/models/protocol"
1010
)
1111

1212
// Mailbox is a data structure that links together a sender and a receiver client.

0 commit comments

Comments
 (0)