Skip to content

Commit

Permalink
go: fix import paths (#5)
Browse files Browse the repository at this point in the history
When trying to go get the application, the import paths were not
correctly prefaced with "github.com/powersj/". This fixes this and
updates the go.mod file with the full module name.
  • Loading branch information
Joshua Powers authored Dec 24, 2020
1 parent 5b802c3 commit 90727ac
Show file tree
Hide file tree
Showing 29 changed files with 68 additions and 59 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ release-snapshot:
goreleaser --rm-dist --skip-publish --snapshot

test:
go test -cover -coverprofile=coverage.out whatsthis/pkg/...
go test -cover -coverprofile=coverage.out ./...

test-coverage: test
go tool cover -html=coverage.out
Expand Down
18 changes: 9 additions & 9 deletions alias.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package whatsthis

import (
"whatsthis/pkg/cloud"
"whatsthis/pkg/container"
"whatsthis/pkg/cpu"
"whatsthis/pkg/distro"
"whatsthis/pkg/memory"
"whatsthis/pkg/network"
"whatsthis/pkg/platform"
"whatsthis/pkg/storage"
"whatsthis/pkg/virt"
"github.com/powersj/whatsthis/pkg/cloud"
"github.com/powersj/whatsthis/pkg/container"
"github.com/powersj/whatsthis/pkg/cpu"
"github.com/powersj/whatsthis/pkg/distro"
"github.com/powersj/whatsthis/pkg/memory"
"github.com/powersj/whatsthis/pkg/network"
"github.com/powersj/whatsthis/pkg/platform"
"github.com/powersj/whatsthis/pkg/storage"
"github.com/powersj/whatsthis/pkg/virt"
)

// CloudProbe alias for cloud.Probe
Expand Down
3 changes: 2 additions & 1 deletion cmd/whatsthis/cmd/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package cmd

import (
"fmt"
"whatsthis"

"github.com/powersj/whatsthis"

"github.com/pkg/errors"
"github.com/spf13/cobra"
Expand Down
3 changes: 2 additions & 1 deletion cmd/whatsthis/cmd/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package cmd

import (
"fmt"
"whatsthis"

"github.com/powersj/whatsthis"

"github.com/pkg/errors"
"github.com/spf13/cobra"
Expand Down
3 changes: 2 additions & 1 deletion cmd/whatsthis/cmd/cpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package cmd

import (
"fmt"
"whatsthis"

"github.com/powersj/whatsthis"

"github.com/pkg/errors"
"github.com/spf13/cobra"
Expand Down
3 changes: 2 additions & 1 deletion cmd/whatsthis/cmd/distro.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package cmd

import (
"fmt"
"whatsthis"

"github.com/powersj/whatsthis"

"github.com/pkg/errors"
"github.com/spf13/cobra"
Expand Down
3 changes: 2 additions & 1 deletion cmd/whatsthis/cmd/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package cmd

import (
"fmt"
"whatsthis"

"github.com/powersj/whatsthis"

"github.com/pkg/errors"
"github.com/spf13/cobra"
Expand Down
3 changes: 2 additions & 1 deletion cmd/whatsthis/cmd/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package cmd

import (
"fmt"
"whatsthis"

"github.com/powersj/whatsthis"

"github.com/pkg/errors"
"github.com/spf13/cobra"
Expand Down
3 changes: 2 additions & 1 deletion cmd/whatsthis/cmd/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package cmd

import (
"fmt"
"whatsthis"

"github.com/powersj/whatsthis"

"github.com/pkg/errors"
"github.com/spf13/cobra"
Expand Down
4 changes: 2 additions & 2 deletions cmd/whatsthis/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"os"

"whatsthis/internal/file"
"whatsthis/internal/system"
"github.com/powersj/whatsthis/internal/file"
"github.com/powersj/whatsthis/internal/system"

"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
Expand Down
3 changes: 2 additions & 1 deletion cmd/whatsthis/cmd/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package cmd

import (
"fmt"
"whatsthis"

"github.com/powersj/whatsthis"

"github.com/pkg/errors"
"github.com/spf13/cobra"
Expand Down
3 changes: 2 additions & 1 deletion cmd/whatsthis/cmd/virt.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package cmd

import (
"fmt"
"whatsthis"

"github.com/powersj/whatsthis"

"github.com/pkg/errors"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cmd/whatsthis/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"runtime"

cmd "whatsthis/cmd/whatsthis/cmd"
cmd "github.com/powersj/whatsthis/cmd/whatsthis/cmd"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module whatsthis
module github.com/powersj/whatsthis

go 1.14

Expand Down
2 changes: 1 addition & 1 deletion internal/cpuid/cpuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cpuid
import (
"bytes"

"whatsthis/internal/util"
"github.com/powersj/whatsthis/internal/util"
)

// Probe struct for cpuid.
Expand Down
2 changes: 1 addition & 1 deletion internal/filesystem/etc.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package filesystem

import (
"whatsthis/internal/file"
"github.com/powersj/whatsthis/internal/file"
)

// Etc represents the /etc filesystem
Expand Down
2 changes: 1 addition & 1 deletion internal/filesystem/proc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strconv"
"strings"

"whatsthis/internal/file"
"github.com/powersj/whatsthis/internal/file"
)

// Proc represents the /proc filesystem
Expand Down
2 changes: 1 addition & 1 deletion internal/filesystem/run.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package filesystem

import (
"whatsthis/internal/file"
"github.com/powersj/whatsthis/internal/file"
)

// Run represents the /run filesystem
Expand Down
4 changes: 2 additions & 2 deletions internal/filesystem/sys.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package filesystem
import (
"path"

"whatsthis/internal/file"
"whatsthis/internal/util"
"github.com/powersj/whatsthis/internal/file"
"github.com/powersj/whatsthis/internal/util"
)

// Sys represents the /sys filesystem
Expand Down
20 changes: 10 additions & 10 deletions internal/system/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ package system
import (
"fmt"

"whatsthis/internal/util"
"whatsthis/pkg/cloud"
"whatsthis/pkg/container"
"whatsthis/pkg/cpu"
"whatsthis/pkg/distro"
"whatsthis/pkg/memory"
"whatsthis/pkg/network"
"whatsthis/pkg/platform"
"whatsthis/pkg/storage"
"whatsthis/pkg/virt"
"github.com/powersj/whatsthis/internal/util"
"github.com/powersj/whatsthis/pkg/cloud"
"github.com/powersj/whatsthis/pkg/container"
"github.com/powersj/whatsthis/pkg/cpu"
"github.com/powersj/whatsthis/pkg/distro"
"github.com/powersj/whatsthis/pkg/memory"
"github.com/powersj/whatsthis/pkg/network"
"github.com/powersj/whatsthis/pkg/platform"
"github.com/powersj/whatsthis/pkg/storage"
"github.com/powersj/whatsthis/pkg/virt"
)

// System struct for all probes we want to report at once.
Expand Down
4 changes: 2 additions & 2 deletions pkg/cloud/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"strings"

"whatsthis/internal/filesystem"
"whatsthis/internal/util"
"github.com/powersj/whatsthis/internal/filesystem"
"github.com/powersj/whatsthis/internal/util"
)

// Probe struct for clouds. Used to store the results of the probe and the
Expand Down
4 changes: 2 additions & 2 deletions pkg/container/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"strings"

"whatsthis/internal/filesystem"
"whatsthis/internal/util"
"github.com/powersj/whatsthis/internal/filesystem"
"github.com/powersj/whatsthis/internal/util"
)

// Probe struct for containres. Used to store the results of the probe and the
Expand Down
4 changes: 2 additions & 2 deletions pkg/cpu/cpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"runtime"
"strings"

"whatsthis/internal/filesystem"
"whatsthis/internal/util"
"github.com/powersj/whatsthis/internal/filesystem"
"github.com/powersj/whatsthis/internal/util"
)

// Probe struct for CPUs.
Expand Down
4 changes: 2 additions & 2 deletions pkg/distro/distro.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"runtime"
"strings"

"whatsthis/internal/filesystem"
"whatsthis/internal/util"
"github.com/powersj/whatsthis/internal/filesystem"
"github.com/powersj/whatsthis/internal/util"
)

// Probe struct for distro.
Expand Down
6 changes: 3 additions & 3 deletions pkg/memory/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package memory
import (
"fmt"

"whatsthis/internal/filesystem"
"whatsthis/internal/units"
"whatsthis/internal/util"
"github.com/powersj/whatsthis/internal/filesystem"
"github.com/powersj/whatsthis/internal/units"
"github.com/powersj/whatsthis/internal/util"
)

// Probe struct for memory.
Expand Down
4 changes: 2 additions & 2 deletions pkg/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"path"
"strings"

"whatsthis/internal/filesystem"
"whatsthis/internal/util"
"github.com/powersj/whatsthis/internal/filesystem"
"github.com/powersj/whatsthis/internal/util"
)

// Probe struct for storage. Splits adapters by physical adapters, virtual
Expand Down
4 changes: 2 additions & 2 deletions pkg/platform/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package platform
import (
"fmt"

"whatsthis/internal/filesystem"
"whatsthis/internal/util"
"github.com/powersj/whatsthis/internal/filesystem"
"github.com/powersj/whatsthis/internal/util"
)

// Probe struct for platform. Captures the BIOS and Board values.
Expand Down
6 changes: 3 additions & 3 deletions pkg/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"strings"

"whatsthis/internal/filesystem"
"whatsthis/internal/units"
"whatsthis/internal/util"
"github.com/powersj/whatsthis/internal/filesystem"
"github.com/powersj/whatsthis/internal/units"
"github.com/powersj/whatsthis/internal/util"
)

// Probe struct for storage. Captures disks, which capture partitions.
Expand Down
4 changes: 2 additions & 2 deletions pkg/virt/virt.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package virt
import (
"fmt"

"whatsthis/internal/cpuid"
"whatsthis/internal/util"
"github.com/powersj/whatsthis/internal/cpuid"
"github.com/powersj/whatsthis/internal/util"
)

// Probe struct for virt. Used to store the results of the probe and the
Expand Down

0 comments on commit 90727ac

Please sign in to comment.