Skip to content

Commit

Permalink
fix: package hierarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
clement2026 committed Sep 5, 2024
1 parent f070475 commit 785537c
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 28 deletions.
Empty file added README.md
Empty file.
2 changes: 1 addition & 1 deletion go/cmd/live-pprof/live-pprof.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
livepprof "github.com/moderato-app/live-pprof/internal"
livepprof "github.com/moderato-app/go/live-pprof/internal"
)

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

go 1.22.6

Expand Down
4 changes: 2 additions & 2 deletions go/internal/chi/chi_web_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/go-chi/chi/v5"
chiMiddleware "github.com/go-chi/chi/v5/middleware"
"github.com/improbable-eng/grpc-web/go/grpcweb"
"github.com/moderato-app/live-pprof/assets"
"github.com/moderato-app/live-pprof/internal/logging"
"github.com/moderato-app/go/live-pprof/assets"
"github.com/moderato-app/go/live-pprof/internal/logging"
)

func WebServer(g *grpcweb.WrappedGrpcServer) *chi.Mux {
Expand Down
2 changes: 1 addition & 1 deletion go/internal/config/live-pprof-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

"github.com/moderato-app/live-pprof/internal/logging"
"github.com/moderato-app/go/live-pprof/internal/logging"
flag "github.com/spf13/pflag"
)

Expand Down
4 changes: 2 additions & 2 deletions go/internal/echo/echo_web_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
"github.com/labstack/gommon/log"
"github.com/moderato-app/live-pprof/assets"
"github.com/moderato-app/live-pprof/internal/logging"
"github.com/moderato-app/go/live-pprof/assets"
"github.com/moderato-app/go/live-pprof/internal/logging"
)

func WebServer(g *grpcweb.WrappedGrpcServer) *echo.Echo {
Expand Down
6 changes: 3 additions & 3 deletions go/internal/general/general_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"sync"
"time"

"github.com/moderato-app/live-pprof/api"
"github.com/moderato-app/live-pprof/internal/logging"
"github.com/moderato-app/live-pprof/internal/metrics"
"github.com/moderato-app/go/live-pprof/api"
"github.com/moderato-app/go/live-pprof/internal/logging"
"github.com/moderato-app/go/live-pprof/internal/metrics"
)

type GeneralServer struct {
Expand Down
12 changes: 6 additions & 6 deletions go/internal/live-pprof.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
"strings"
"time"

"github.com/moderato-app/live-pprof/api"
"github.com/moderato-app/live-pprof/internal/config"
"github.com/moderato-app/live-pprof/internal/general"
"github.com/moderato-app/live-pprof/internal/logging"
"github.com/moderato-app/live-pprof/internal/metrics"
"github.com/moderato-app/live-pprof/internal/util"
"github.com/moderato-app/go/live-pprof/api"
"github.com/moderato-app/go/live-pprof/internal/config"
"github.com/moderato-app/go/live-pprof/internal/general"
"github.com/moderato-app/go/live-pprof/internal/logging"
"github.com/moderato-app/go/live-pprof/internal/metrics"
"github.com/moderato-app/go/live-pprof/internal/util"
"github.com/pkg/browser"
"google.golang.org/grpc"
)
Expand Down
4 changes: 2 additions & 2 deletions go/internal/metrics/metrics_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"net/http"
"time"

"github.com/moderato-app/live-pprof/api"
"github.com/moderato-app/live-pprof/internal/logging"
"github.com/moderato-app/go/live-pprof/api"
"github.com/moderato-app/go/live-pprof/internal/logging"
"github.com/moderato-app/pprof/moderato"
)

Expand Down
4 changes: 2 additions & 2 deletions go/internal/metrics/mock_assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"sync"
"sync/atomic"

"github.com/moderato-app/live-pprof/assets"
"github.com/moderato-app/live-pprof/internal/logging"
"github.com/moderato-app/go/live-pprof/assets"
"github.com/moderato-app/go/live-pprof/internal/logging"
"github.com/moderato-app/pprof/moderato"
)

Expand Down
5 changes: 3 additions & 2 deletions go/internal/metrics/mock_metrics_server.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
//go:build !prod

package metrics

import (
"context"

"github.com/moderato-app/live-pprof/api"
"github.com/moderato-app/live-pprof/internal/logging"
"github.com/moderato-app/go/live-pprof/api"
"github.com/moderato-app/go/live-pprof/internal/logging"
)

// MockMetricsServer returns mock data instead of real data to save development time
Expand Down
4 changes: 2 additions & 2 deletions go/internal/metrics/mock_metrics_server_prod.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"context"
"errors"

"github.com/moderato-app/live-pprof/api"
"github.com/moderato-app/live-pprof/internal/logging"
"github.com/moderato-app/go/live-pprof/api"
"github.com/moderato-app/go/live-pprof/internal/logging"
)

var mockNotAvailableErr = errors.New("mock data is not available for a prod build")
Expand Down
6 changes: 3 additions & 3 deletions go/internal/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"time"

"github.com/improbable-eng/grpc-web/go/grpcweb"
chi2 "github.com/moderato-app/live-pprof/internal/chi"
"github.com/moderato-app/live-pprof/internal/config"
"github.com/moderato-app/live-pprof/internal/logging"
chi2 "github.com/moderato-app/go/live-pprof/internal/chi"
"github.com/moderato-app/go/live-pprof/internal/config"
"github.com/moderato-app/go/live-pprof/internal/logging"
"google.golang.org/grpc"
)

Expand Down
2 changes: 1 addition & 1 deletion go/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/moderato-app/live-pprof/internal"
"github.com/moderato-app/go/live-pprof/internal"
)

func main() {
Expand Down

0 comments on commit 785537c

Please sign in to comment.