Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Neo importable in Go #19

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'

Expand Down
6 changes: 3 additions & 3 deletions cmd/client/cli/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (
"github.com/spf13/cobra"
"google.golang.org/protobuf/types/known/durationpb"

"github.com/c4t-but-s4d/neo/internal/client"
"github.com/c4t-but-s4d/neo/pkg/archive"
epb "github.com/c4t-but-s4d/neo/proto/go/exploits"
"github.com/c4t-but-s4d/neo/v2/internal/client"
"github.com/c4t-but-s4d/neo/v2/pkg/archive"
epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
)

type addCLI struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/client/cli/broadcast.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/c4t-but-s4d/neo/internal/client"
"github.com/c4t-but-s4d/neo/v2/internal/client"
)

type broadcastCLI struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/client/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/encoding/gzip"

"github.com/c4t-but-s4d/neo/internal/client"
"github.com/c4t-but-s4d/neo/pkg/grpcauth"
"github.com/c4t-but-s4d/neo/v2/internal/client"
"github.com/c4t-but-s4d/neo/v2/pkg/grpcauth"
)

type NeoCLI interface {
Expand Down
10 changes: 5 additions & 5 deletions cmd/client/cli/dry_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/c4t-but-s4d/neo/internal/client"
"github.com/c4t-but-s4d/neo/internal/config"
"github.com/c4t-but-s4d/neo/internal/exploit"
"github.com/c4t-but-s4d/neo/internal/queue"
"github.com/c4t-but-s4d/neo/pkg/joblogger"
"github.com/c4t-but-s4d/neo/v2/internal/client"
"github.com/c4t-but-s4d/neo/v2/internal/config"
"github.com/c4t-but-s4d/neo/v2/internal/exploit"
"github.com/c4t-but-s4d/neo/v2/internal/queue"
"github.com/c4t-but-s4d/neo/v2/pkg/joblogger"
)

type dryRunCLI struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/client/cli/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"github.com/spf13/cobra"

"github.com/c4t-but-s4d/neo/internal/client"
"github.com/c4t-but-s4d/neo/internal/config"
"github.com/c4t-but-s4d/neo/v2/internal/client"
"github.com/c4t-but-s4d/neo/v2/internal/config"
)

type infoCLI struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/client/cli/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/c4t-but-s4d/neo/internal/client"
"github.com/c4t-but-s4d/neo/internal/exploit"
"github.com/c4t-but-s4d/neo/pkg/joblogger"
"github.com/c4t-but-s4d/neo/v2/internal/client"
"github.com/c4t-but-s4d/neo/v2/internal/exploit"
"github.com/c4t-but-s4d/neo/v2/pkg/joblogger"
)

const JobsPerCPU = 5
Expand Down
2 changes: 1 addition & 1 deletion cmd/client/cli/set_disabled.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/spf13/cobra"

"github.com/c4t-but-s4d/neo/internal/client"
"github.com/c4t-but-s4d/neo/v2/internal/client"
)

type setDisabledCli struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/client/cli/single.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/c4t-but-s4d/neo/internal/client"
"github.com/c4t-but-s4d/neo/v2/internal/client"
)

type singleRunCLI struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/client/cli/tail.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/c4t-but-s4d/neo/internal/client"
logspb "github.com/c4t-but-s4d/neo/proto/go/logs"
"github.com/c4t-but-s4d/neo/v2/internal/client"
logspb "github.com/c4t-but-s4d/neo/v2/proto/go/logs"
)

type tailCLI struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/client/cli/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"github.com/spf13/cobra"
"google.golang.org/protobuf/types/known/durationpb"

"github.com/c4t-but-s4d/neo/internal/client"
"github.com/c4t-but-s4d/neo/v2/internal/client"

epb "github.com/c4t-but-s4d/neo/proto/go/exploits"
epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
)

type updateCLI struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/client/cli/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/samber/lo"

"github.com/c4t-but-s4d/neo/proto/go/exploits"
"github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
)

func isBinary(data []byte) bool {
Expand Down
4 changes: 2 additions & 2 deletions cmd/client/cmd/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/c4t-but-s4d/neo/cmd/client/cli"
"github.com/c4t-but-s4d/neo/internal/client"
"github.com/c4t-but-s4d/neo/v2/cmd/client/cli"
"github.com/c4t-but-s4d/neo/v2/internal/client"
)

// addCmd represents the add command
Expand Down
4 changes: 2 additions & 2 deletions cmd/client/cmd/broadcast.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/c4t-but-s4d/neo/cmd/client/cli"
"github.com/c4t-but-s4d/neo/internal/client"
"github.com/c4t-but-s4d/neo/v2/cmd/client/cli"
"github.com/c4t-but-s4d/neo/v2/internal/client"
)

// broadcastCmd represents the broadcast command
Expand Down
4 changes: 2 additions & 2 deletions cmd/client/cmd/disable.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/c4t-but-s4d/neo/cmd/client/cli"
"github.com/c4t-but-s4d/neo/internal/client"
"github.com/c4t-but-s4d/neo/v2/cmd/client/cli"
"github.com/c4t-but-s4d/neo/v2/internal/client"
)

// disableCmd represents the disable command
Expand Down
4 changes: 2 additions & 2 deletions cmd/client/cmd/dry_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/c4t-but-s4d/neo/cmd/client/cli"
"github.com/c4t-but-s4d/neo/internal/client"
"github.com/c4t-but-s4d/neo/v2/cmd/client/cli"
"github.com/c4t-but-s4d/neo/v2/internal/client"
)

// runCmd represents the run command
Expand Down
4 changes: 2 additions & 2 deletions cmd/client/cmd/enable.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/c4t-but-s4d/neo/cmd/client/cli"
"github.com/c4t-but-s4d/neo/internal/client"
"github.com/c4t-but-s4d/neo/v2/cmd/client/cli"
"github.com/c4t-but-s4d/neo/v2/internal/client"
)

// enableCmd represents the enable command
Expand Down
4 changes: 2 additions & 2 deletions cmd/client/cmd/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/c4t-but-s4d/neo/cmd/client/cli"
"github.com/c4t-but-s4d/neo/internal/client"
"github.com/c4t-but-s4d/neo/v2/cmd/client/cli"
"github.com/c4t-but-s4d/neo/v2/internal/client"
)

// infoCmd represents the info command
Expand Down
2 changes: 1 addition & 1 deletion cmd/client/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/c4t-but-s4d/neo/internal/logger"
"github.com/c4t-but-s4d/neo/v2/internal/logger"
)

// rootCmd represents the base command when called without any subcommands
Expand Down
4 changes: 2 additions & 2 deletions cmd/client/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/c4t-but-s4d/neo/cmd/client/cli"
"github.com/c4t-but-s4d/neo/internal/client"
"github.com/c4t-but-s4d/neo/v2/cmd/client/cli"
"github.com/c4t-but-s4d/neo/v2/internal/client"
)

// runCmd represents the run command
Expand Down
4 changes: 2 additions & 2 deletions cmd/client/cmd/single.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/c4t-but-s4d/neo/cmd/client/cli"
"github.com/c4t-but-s4d/neo/internal/client"
"github.com/c4t-but-s4d/neo/v2/cmd/client/cli"
"github.com/c4t-but-s4d/neo/v2/internal/client"
)

// singleRunCmd represents the single command
Expand Down
4 changes: 2 additions & 2 deletions cmd/client/cmd/tail.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/c4t-but-s4d/neo/cmd/client/cli"
"github.com/c4t-but-s4d/neo/internal/client"
"github.com/c4t-but-s4d/neo/v2/cmd/client/cli"
"github.com/c4t-but-s4d/neo/v2/internal/client"
)

// tailCmd represents the tail command
Expand Down
5 changes: 3 additions & 2 deletions cmd/client/cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package cmd
import (
"time"

"github.com/c4t-but-s4d/neo/cmd/client/cli"
"github.com/c4t-but-s4d/neo/internal/client"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/c4t-but-s4d/neo/v2/cmd/client/cli"
"github.com/c4t-but-s4d/neo/v2/internal/client"
)

// tailCmd represents the tail command
Expand Down
2 changes: 1 addition & 1 deletion cmd/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"os/signal"

"github.com/c4t-but-s4d/neo/cmd/client/cmd"
"github.com/c4t-but-s4d/neo/v2/cmd/client/cmd"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/reaper/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"github.com/sirupsen/logrus"

"github.com/c4t-but-s4d/neo/internal/logger"
"github.com/c4t-but-s4d/neo/pkg/neoproc"
"github.com/c4t-but-s4d/neo/v2/internal/logger"
"github.com/c4t-but-s4d/neo/v2/pkg/neoproc"
)

func main() {
Expand Down
20 changes: 10 additions & 10 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ import (
_ "google.golang.org/grpc/encoding/gzip"
"google.golang.org/grpc/reflection"

"github.com/c4t-but-s4d/neo/internal/logger"
"github.com/c4t-but-s4d/neo/internal/server/config"
"github.com/c4t-but-s4d/neo/internal/server/exploits"
"github.com/c4t-but-s4d/neo/internal/server/fs"
logs "github.com/c4t-but-s4d/neo/internal/server/logs"
"github.com/c4t-but-s4d/neo/pkg/grpcauth"
"github.com/c4t-but-s4d/neo/pkg/neosync"
epb "github.com/c4t-but-s4d/neo/proto/go/exploits"
fspb "github.com/c4t-but-s4d/neo/proto/go/fileserver"
logspb "github.com/c4t-but-s4d/neo/proto/go/logs"
"github.com/c4t-but-s4d/neo/v2/internal/logger"
"github.com/c4t-but-s4d/neo/v2/internal/server/config"
"github.com/c4t-but-s4d/neo/v2/internal/server/exploits"
"github.com/c4t-but-s4d/neo/v2/internal/server/fs"
logs "github.com/c4t-but-s4d/neo/v2/internal/server/logs"
"github.com/c4t-but-s4d/neo/v2/pkg/grpcauth"
"github.com/c4t-but-s4d/neo/v2/pkg/neosync"
epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
fspb "github.com/c4t-but-s4d/neo/v2/proto/go/fileserver"
logspb "github.com/c4t-but-s4d/neo/v2/proto/go/logs"
)

func main() {
Expand Down
2 changes: 0 additions & 2 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '2.4'

services:
server:
build: .
Expand Down
37 changes: 20 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,55 +1,58 @@
module github.com/c4t-but-s4d/neo
module github.com/c4t-but-s4d/neo/v2

go 1.21

require (
github.com/denisbrodbeck/machineid v1.0.1
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-redis/redis/v8 v8.11.5
github.com/google/go-cmp v0.5.9
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.3.1
github.com/mitchellh/mapstructure v1.5.0
github.com/sirupsen/logrus v1.9.3
github.com/spaolacci/murmur3 v1.1.0
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.16.0
github.com/spf13/viper v1.17.0
github.com/stretchr/testify v1.8.4
go.etcd.io/bbolt v1.3.7
go.uber.org/goleak v1.2.1
google.golang.org/grpc v1.57.0
google.golang.org/grpc v1.58.3
google.golang.org/protobuf v1.31.0
gopkg.in/yaml.v3 v3.0.1 // indirect
)

require (
github.com/prometheus/client_golang v1.16.0
github.com/prometheus/client_golang v1.17.0
github.com/prometheus/common v0.44.0
github.com/samber/lo v1.38.1
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63
golang.org/x/sys v0.11.0
golang.org/x/sys v0.13.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/pelletier/go-toml/v2 v2.0.9 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/sagikazarmark/locafero v0.3.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.10.0 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/text v0.12.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
)
Loading
Loading