Skip to content

Commit

Permalink
refactor: moved files to standard layout
Browse files Browse the repository at this point in the history
  • Loading branch information
aacebedo committed Jan 28, 2024
1 parent 38436e3 commit 941e4ec
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 16 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/core/cmdline.go → internal/core/cmdline.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package core

import (
"fmt"
"github.com/aacebedo/dnsdock/src/utils"
"github.com/aacebedo/dnsdock/internal/utils"
"gopkg.in/alecthomas/kingpin.v2"
"strconv"
)
Expand Down
4 changes: 2 additions & 2 deletions src/core/docker.go → internal/core/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ package core
import (
"crypto/tls"
"errors"
"github.com/aacebedo/dnsdock/src/servers"
"github.com/aacebedo/dnsdock/src/utils"
"github.com/aacebedo/dnsdock/internal/servers"
"github.com/aacebedo/dnsdock/internal/utils"
"github.com/docker/engine-api/client"
"github.com/docker/engine-api/types"
eventtypes "github.com/docker/engine-api/types/events"
Expand Down
2 changes: 1 addition & 1 deletion src/core/docker_test.go → internal/core/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
package core

import (
"github.com/aacebedo/dnsdock/src/servers"
"github.com/aacebedo/dnsdock/internal/servers"
"reflect"
"testing"
)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/servers/dnsserver.go → internal/servers/dnsserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ package servers
import (
"errors"
"fmt"
"github.com/aacebedo/dnsdock/src/utils"
"github.com/aacebedo/dnsdock/internal/utils"
"github.com/miekg/dns"
"net"
"regexp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
package servers

import (
"github.com/aacebedo/dnsdock/src/utils"
"github.com/aacebedo/dnsdock/internal/utils"
"github.com/miekg/dns"
"net"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion src/servers/http.go → internal/servers/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package servers

import (
"encoding/json"
"github.com/aacebedo/dnsdock/src/utils"
"github.com/aacebedo/dnsdock/internal/utils"
"github.com/gorilla/mux"
"net/http"
)
Expand Down
6 changes: 3 additions & 3 deletions src/servers/http_test.go → internal/servers/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
package servers

import (
"github.com/aacebedo/dnsdock/src/utils"
"io/ioutil"
"github.com/aacebedo/dnsdock/internal/utils"
"io"
"net/http"
"strings"
"testing"
Expand Down Expand Up @@ -66,7 +66,7 @@ func TestServiceRequests(t *testing.T) {
continue
}

actual, err := ioutil.ReadAll(resp.Body)
actual, err := io.ReadAll(resp.Body)
if err != nil {
t.Error(err)
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/utils/loggers.go → internal/utils/loggers.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package utils

import (
"github.com/op/go-logging"
"io/ioutil"
"io"
"os"
)

Expand All @@ -22,7 +22,7 @@ func InitLoggers(verbosity int) (err error) {

switch {
case verbosity == 0:
backend = logging.NewLogBackend(ioutil.Discard, "", 0)
backend = logging.NewLogBackend(io.Discard, "", 0)
case verbosity >= 1:
backend = logging.NewLogBackend(os.Stdout, "", 0)
}
Expand Down
8 changes: 4 additions & 4 deletions src/main.go → main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ package main
import (
"crypto/tls"
"crypto/x509"
"github.com/aacebedo/dnsdock/src/core"
"github.com/aacebedo/dnsdock/src/servers"
"github.com/aacebedo/dnsdock/src/utils"
"github.com/aacebedo/dnsdock/internal/core"
"github.com/aacebedo/dnsdock/internal/servers"
"github.com/aacebedo/dnsdock/internal/utils"
"github.com/op/go-logging"
"io/ioutil"
"os"
)
// GitSummary contains the version number
var GitSummary string
var GitSummary string
var logger = logging.MustGetLogger("dnsdock.main")

func main() {
Expand Down

0 comments on commit 941e4ec

Please sign in to comment.