Skip to content

Commit

Permalink
Merge pull request #17 from ninedraft/move-code-to-subpackage
Browse files Browse the repository at this point in the history
refactor(project): ♻️ move source code into a subpackage
  • Loading branch information
ninedraft committed Mar 30, 2021
2 parents 347baa6 + 730c0ce commit d8d9c8b
Show file tree
Hide file tree
Showing 28 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ MIT

## Installation

`go install github.com/ninedraft/gemax`
`go install github.com/ninedraft/gemax/gemax`

## Examples

Expand Down
2 changes: 1 addition & 1 deletion examples/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"embed"
"log"

gemax "github.com/ninedraft/gemax"
gemax "github.com/ninedraft/gemax/gemax"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions client.go → gemax/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"strings"
"sync"

"github.com/ninedraft/gemax/internal/bufreader"
"github.com/ninedraft/gemax/status"
"github.com/ninedraft/gemax/gemax/internal/bufreader"
"github.com/ninedraft/gemax/gemax/status"
)

// Client is used to fetch gemini resources.
Expand Down
4 changes: 2 additions & 2 deletions client_header.go → gemax/client_header.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strconv"
"strings"

"github.com/ninedraft/gemax/internal/multierr"
"github.com/ninedraft/gemax/status"
"github.com/ninedraft/gemax/gemax/internal/multierr"
"github.com/ninedraft/gemax/gemax/status"
)

// MaxHeaderSize is used while parsing server responses.
Expand Down
4 changes: 2 additions & 2 deletions client_header_test.go → gemax/client_header_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"strings"
"testing"

"github.com/ninedraft/gemax"
"github.com/ninedraft/gemax/status"
"github.com/ninedraft/gemax/gemax"
"github.com/ninedraft/gemax/gemax/status"
)

func TestParseResponseHeader(test *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions client_test.go → gemax/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"io"
"testing"

"github.com/ninedraft/gemax"
"github.com/ninedraft/gemax/internal/tester"
"github.com/ninedraft/gemax/gemax"
"github.com/ninedraft/gemax/gemax/internal/tester"
)

//go:embed testdata/client/pages/*
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion fs.go → gemax/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"path"
"strings"

"github.com/ninedraft/gemax/status"
"github.com/ninedraft/gemax/gemax/status"
)

// FileSystem serves file systems as gemini catalogs.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"errors"
"io"

"github.com/ninedraft/gemax/internal/multierr"
"github.com/ninedraft/gemax/gemax/internal/multierr"
)

// Writer is a buffered io.Writer wrapper.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions response.go → gemax/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"io"
"sync"

"github.com/ninedraft/gemax/internal/bufwriter"
"github.com/ninedraft/gemax/status"
"github.com/ninedraft/gemax/gemax/internal/bufwriter"
"github.com/ninedraft/gemax/gemax/status"
)

// ResponseWriter describes a server side response writer.
Expand Down
2 changes: 1 addition & 1 deletion server.go → gemax/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/url"
"sync"

"github.com/ninedraft/gemax/status"
"github.com/ninedraft/gemax/gemax/status"
)

// Handler describes a gemini protocol handler.
Expand Down
4 changes: 2 additions & 2 deletions server_test.go → gemax/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"testing"
"time"

"github.com/ninedraft/gemax"
"github.com/ninedraft/gemax/status"
"github.com/ninedraft/gemax/gemax"
"github.com/ninedraft/gemax/gemax/status"
)

func TestServerSuccess(test *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion server_utils.go → gemax/server_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"sort"
"strings"

"github.com/ninedraft/gemax/status"
"github.com/ninedraft/gemax/gemax/status"
)

// Redirect client to another page.
Expand Down
4 changes: 2 additions & 2 deletions server_utils_test.go → gemax/server_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strings"
"testing"

"github.com/ninedraft/gemax"
"github.com/ninedraft/gemax/status"
"github.com/ninedraft/gemax/gemax"
"github.com/ninedraft/gemax/gemax/status"
)

func TestServeContent(test *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d8d9c8b

Please sign in to comment.