diff --git a/api/api.go b/api/api.go index f57cf65..e172a11 100644 --- a/api/api.go +++ b/api/api.go @@ -6,7 +6,7 @@ import ( "net/http" "github.com/diamondburned/arikawa/api/rate" - "github.com/diamondburned/arikawa/httputil" + "github.com/diamondburned/arikawa/internal/httputil" ) const ( diff --git a/api/channel.go b/api/channel.go index 3dc0619..fdeb88f 100644 --- a/api/channel.go +++ b/api/channel.go @@ -2,8 +2,8 @@ package api import ( "github.com/diamondburned/arikawa/discord" - "github.com/diamondburned/arikawa/httputil" - "github.com/diamondburned/arikawa/json" + "github.com/diamondburned/arikawa/internal/httputil" + "github.com/diamondburned/arikawa/internal/json" ) const EndpointChannels = Endpoint + "channels/" diff --git a/api/emoji.go b/api/emoji.go index 085eade..9c8c1d3 100644 --- a/api/emoji.go +++ b/api/emoji.go @@ -4,7 +4,7 @@ import ( "errors" "github.com/diamondburned/arikawa/discord" - "github.com/diamondburned/arikawa/httputil" + "github.com/diamondburned/arikawa/internal/httputil" ) // EmojiAPI is a special format that the API wants. diff --git a/api/guild.go b/api/guild.go index 02a620b..94b2be2 100644 --- a/api/guild.go +++ b/api/guild.go @@ -5,7 +5,7 @@ import ( "github.com/diamondburned/arikawa/discord" // for clarity d "github.com/diamondburned/arikawa/discord" - "github.com/diamondburned/arikawa/httputil" + "github.com/diamondburned/arikawa/internal/httputil" ) const EndpointGuilds = Endpoint + "guilds/" diff --git a/api/invite.go b/api/invite.go index 97bb50e..be66afe 100644 --- a/api/invite.go +++ b/api/invite.go @@ -2,7 +2,7 @@ package api import ( "github.com/diamondburned/arikawa/discord" - "github.com/diamondburned/arikawa/httputil" + "github.com/diamondburned/arikawa/internal/httputil" ) const EndpointInvites = Endpoint + "invites/" diff --git a/api/message.go b/api/message.go index 1eed17a..7d8ea24 100644 --- a/api/message.go +++ b/api/message.go @@ -4,7 +4,7 @@ import ( "io" "github.com/diamondburned/arikawa/discord" - "github.com/diamondburned/arikawa/httputil" + "github.com/diamondburned/arikawa/internal/httputil" "github.com/pkg/errors" ) diff --git a/api/message_reaction.go b/api/message_reaction.go index 74b2118..29ca6c3 100644 --- a/api/message_reaction.go +++ b/api/message_reaction.go @@ -2,7 +2,7 @@ package api import ( "github.com/diamondburned/arikawa/discord" - "github.com/diamondburned/arikawa/httputil" + "github.com/diamondburned/arikawa/internal/httputil" ) // React adds a reaction to the message. This requires READ_MESSAGE_HISTORY (and diff --git a/api/message_send.go b/api/message_send.go index fe02622..abff37c 100644 --- a/api/message_send.go +++ b/api/message_send.go @@ -10,7 +10,7 @@ import ( "strings" "github.com/diamondburned/arikawa/discord" - "github.com/diamondburned/arikawa/json" + "github.com/diamondburned/arikawa/internal/json" "github.com/pkg/errors" ) diff --git a/api/user.go b/api/user.go index dff944e..a43dd60 100644 --- a/api/user.go +++ b/api/user.go @@ -2,7 +2,7 @@ package api import ( "github.com/diamondburned/arikawa/discord" - "github.com/diamondburned/arikawa/httputil" + "github.com/diamondburned/arikawa/internal/httputil" ) const EndpointUsers = Endpoint + "users/" diff --git a/gateway/gateway.go b/gateway/gateway.go index e51669b..c7c9847 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -15,9 +15,9 @@ import ( "time" "github.com/diamondburned/arikawa/api" - "github.com/diamondburned/arikawa/httputil" - "github.com/diamondburned/arikawa/json" - "github.com/diamondburned/arikawa/wsutil" + "github.com/diamondburned/arikawa/internal/httputil" + "github.com/diamondburned/arikawa/internal/json" + "github.com/diamondburned/arikawa/internal/wsutil" "github.com/pkg/errors" ) diff --git a/gateway/op.go b/gateway/op.go index 3a0a26a..beacecb 100644 --- a/gateway/op.go +++ b/gateway/op.go @@ -4,8 +4,8 @@ import ( "fmt" "log" - "github.com/diamondburned/arikawa/json" - "github.com/diamondburned/arikawa/wsutil" + "github.com/diamondburned/arikawa/internal/json" + "github.com/diamondburned/arikawa/internal/wsutil" "github.com/pkg/errors" ) diff --git a/httputil/client.go b/internal/httputil/client.go similarity index 98% rename from httputil/client.go rename to internal/httputil/client.go index ee09186..d20a67d 100644 --- a/httputil/client.go +++ b/internal/httputil/client.go @@ -9,7 +9,7 @@ import ( "net/http" "time" - "github.com/diamondburned/arikawa/json" + "github.com/diamondburned/arikawa/internal/json" ) type Client struct { diff --git a/httputil/errors.go b/internal/httputil/errors.go similarity index 100% rename from httputil/errors.go rename to internal/httputil/errors.go diff --git a/httputil/http.go b/internal/httputil/http.go similarity index 100% rename from httputil/http.go rename to internal/httputil/http.go diff --git a/httputil/options.go b/internal/httputil/options.go similarity index 95% rename from httputil/options.go rename to internal/httputil/options.go index 212e3af..c3f178e 100644 --- a/httputil/options.go +++ b/internal/httputil/options.go @@ -6,7 +6,7 @@ import ( "io/ioutil" "net/http" - "github.com/diamondburned/arikawa/json" + "github.com/diamondburned/arikawa/internal/json" ) type RequestOption func(*http.Request) error diff --git a/httputil/schema.go b/internal/httputil/schema.go similarity index 100% rename from httputil/schema.go rename to internal/httputil/schema.go diff --git a/json/json.go b/internal/json/json.go similarity index 100% rename from json/json.go rename to internal/json/json.go diff --git a/wsutil/conn.go b/internal/wsutil/conn.go similarity index 98% rename from wsutil/conn.go rename to internal/wsutil/conn.go index 2d3ac6d..2aed7c2 100644 --- a/wsutil/conn.go +++ b/internal/wsutil/conn.go @@ -7,7 +7,7 @@ import ( "net/http" "time" - "github.com/diamondburned/arikawa/json" + "github.com/diamondburned/arikawa/internal/json" "github.com/pkg/errors" "nhooyr.io/websocket" ) diff --git a/wsutil/throttler.go b/internal/wsutil/throttler.go similarity index 100% rename from wsutil/throttler.go rename to internal/wsutil/throttler.go diff --git a/wsutil/ws.go b/internal/wsutil/ws.go similarity index 96% rename from wsutil/ws.go rename to internal/wsutil/ws.go index cf1181a..a03cc43 100644 --- a/wsutil/ws.go +++ b/internal/wsutil/ws.go @@ -6,7 +6,7 @@ import ( "context" "time" - "github.com/diamondburned/arikawa/json" + "github.com/diamondburned/arikawa/internal/json" "github.com/pkg/errors" "golang.org/x/time/rate" ) diff --git a/session/session.go b/session/session.go index 8a8a75b..e06b53f 100644 --- a/session/session.go +++ b/session/session.go @@ -7,7 +7,7 @@ import ( "github.com/diamondburned/arikawa/api" "github.com/diamondburned/arikawa/gateway" - "github.com/diamondburned/arikawa/json" + "github.com/diamondburned/arikawa/internal/json" ) /*