Skip to content

Commit

Permalink
Merge pull request #21 from devzero-inc/migrate-package-name
Browse files Browse the repository at this point in the history
Migrate module name
  • Loading branch information
Tzvonimir authored Oct 30, 2024
2 parents ec5a9b7 + 4755246 commit 7d6d2f5
Show file tree
Hide file tree
Showing 21 changed files with 72 additions and 54 deletions.
5 changes: 3 additions & 2 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package client
import (
"context"
"fmt"
gen "lda/gen/api/v1"
"lda/logging"
"time"

gen "github.com/devzero-inc/local-developer-analytics/gen/api/v1"
"github.com/devzero-inc/local-developer-analytics/logging"

"github.com/rs/zerolog"
"google.golang.org/grpc"
"google.golang.org/grpc/connectivity"
Expand Down
19 changes: 10 additions & 9 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@ package cmd
import (
"fmt"
"io"
"lda/config"
"lda/daemon"
"lda/database"
"lda/job"
"lda/logging"
"lda/resources"
"lda/shell"
"lda/user"
"lda/util"
"net/http"
"os"
"strings"

"github.com/devzero-inc/local-developer-analytics/config"
"github.com/devzero-inc/local-developer-analytics/daemon"
"github.com/devzero-inc/local-developer-analytics/database"
"github.com/devzero-inc/local-developer-analytics/job"
"github.com/devzero-inc/local-developer-analytics/logging"
"github.com/devzero-inc/local-developer-analytics/resources"
"github.com/devzero-inc/local-developer-analytics/shell"
"github.com/devzero-inc/local-developer-analytics/user"
"github.com/devzero-inc/local-developer-analytics/util"

"github.com/pkg/errors"
"github.com/spf13/cobra"
)
Expand Down
13 changes: 7 additions & 6 deletions cmd/collect.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package cmd

import (
"lda/client"
"lda/collector"
"lda/config"
"lda/logging"
"lda/process"
"lda/user"
"time"

"github.com/devzero-inc/local-developer-analytics/client"
"github.com/devzero-inc/local-developer-analytics/collector"
"github.com/devzero-inc/local-developer-analytics/config"
"github.com/devzero-inc/local-developer-analytics/logging"
"github.com/devzero-inc/local-developer-analytics/process"
"github.com/devzero-inc/local-developer-analytics/user"

"github.com/pkg/errors"

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

import (
"fmt"
"lda/config"

"github.com/devzero-inc/local-developer-analytics/config"

"github.com/spf13/cobra"
)
Expand Down
9 changes: 5 additions & 4 deletions collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ package collector
import (
"context"
"fmt"
"lda/client"
gen "lda/gen/api/v1"
"lda/process"
"lda/util"
"net"
"strings"
"sync"

"github.com/devzero-inc/local-developer-analytics/client"
gen "github.com/devzero-inc/local-developer-analytics/gen/api/v1"
"github.com/devzero-inc/local-developer-analytics/process"
"github.com/devzero-inc/local-developer-analytics/util"

"github.com/rs/zerolog"

"time"
Expand Down
9 changes: 5 additions & 4 deletions collector/command.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package collector

import (
"lda/config"
"lda/database"
gen "lda/gen/api/v1"
"lda/logging"
"regexp"
"time"

"github.com/devzero-inc/local-developer-analytics/config"
"github.com/devzero-inc/local-developer-analytics/database"
gen "github.com/devzero-inc/local-developer-analytics/gen/api/v1"
"github.com/devzero-inc/local-developer-analytics/logging"
)

// Command is the model for command
Expand Down
3 changes: 2 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
_ "embed"
"fmt"
"io"
"lda/util"
"os"
"os/user"
"path/filepath"

"github.com/devzero-inc/local-developer-analytics/util"

"github.com/pkg/errors"

"github.com/spf13/viper"
Expand Down
3 changes: 2 additions & 1 deletion config/os.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package config

import (
"fmt"
"lda/util"
"os"
"os/user"
"path"
"path/filepath"
"runtime"

"github.com/devzero-inc/local-developer-analytics/util"

"github.com/manifoldco/promptui"
)

Expand Down
5 changes: 3 additions & 2 deletions daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import (
"embed"
"fmt"
"html/template"
"lda/config"
"lda/util"
"os/exec"
"os/user"
"path/filepath"

"github.com/devzero-inc/local-developer-analytics/config"
"github.com/devzero-inc/local-developer-analytics/util"

"github.com/spf13/afero"

"github.com/rs/zerolog"
Expand Down
5 changes: 3 additions & 2 deletions database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package database

import (
"fmt"
"lda/config"
"lda/util"
"os"
"os/user"
"path/filepath"

"github.com/devzero-inc/local-developer-analytics/config"
"github.com/devzero-inc/local-developer-analytics/util"

"github.com/jmoiron/sqlx"
_ "github.com/mattn/go-sqlite3"
)
Expand Down
3 changes: 2 additions & 1 deletion database/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package database

import (
"fmt"
"lda/config"
"os"

"github.com/devzero-inc/local-developer-analytics/config"
)

// RunMigrations all additional migrations should be registered here
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 lda
module github.com/devzero-inc/local-developer-analytics

go 1.21.4

Expand Down
5 changes: 3 additions & 2 deletions job/job.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package job

import (
"lda/collector"
"lda/process"
"time"

"github.com/devzero-inc/local-developer-analytics/collector"
"github.com/devzero-inc/local-developer-analytics/process"
)

// Cleanup job that will run in background and every 'hours' try to run the ticker
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"lda/cmd"
"github.com/devzero-inc/local-developer-analytics/cmd"
)

func main() {
Expand Down
5 changes: 3 additions & 2 deletions process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package process
import (
"errors"
"fmt"
"lda/database"
gen "lda/gen/api/v1"
"time"

"github.com/devzero-inc/local-developer-analytics/database"
gen "github.com/devzero-inc/local-developer-analytics/gen/api/v1"

"github.com/rs/zerolog"
)

Expand Down
2 changes: 1 addition & 1 deletion proto/api/v1/collector.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package api.v1;

import "google/protobuf/empty.proto";

option go_package = "lda/gen/api/v1;gen";
option go_package = "github.com/devzero-inc/local-developer-analytics/gen/api/v1;gen";
option java_multiple_files = true;
option java_package = "gen.api.v1";

Expand Down
5 changes: 3 additions & 2 deletions resources/charts.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package resources
import (
"encoding/json"
"fmt"
"lda/collector"
"lda/process"
"math"

"github.com/devzero-inc/local-developer-analytics/collector"
"github.com/devzero-inc/local-developer-analytics/process"
)

// ChartData represents the overall structure for a Chart.js chart configuration.
Expand Down
7 changes: 4 additions & 3 deletions resources/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ package resources
import (
"embed"
"encoding/json"
"lda/collector"
"lda/logging"
"lda/process"
"net/http"
"strconv"
"sync"
"text/template"
"time"

"github.com/devzero-inc/local-developer-analytics/collector"
"github.com/devzero-inc/local-developer-analytics/logging"
"github.com/devzero-inc/local-developer-analytics/process"
)

// Embedding directory
Expand Down
7 changes: 4 additions & 3 deletions shell/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import (
"bytes"
"embed"
"fmt"
"lda/collector"
"lda/config"
"lda/util"
"os"
"os/user"
"path/filepath"
"strings"
"text/template"

"github.com/devzero-inc/local-developer-analytics/collector"
"github.com/devzero-inc/local-developer-analytics/config"
"github.com/devzero-inc/local-developer-analytics/util"

"github.com/manifoldco/promptui"
"github.com/rs/zerolog"
)
Expand Down
11 changes: 6 additions & 5 deletions user/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ import (
"database/sql"
"errors"
"fmt"
"lda/collector"
"lda/config"
"lda/database"
"lda/logging"
"lda/util"
"os"
"os/user"
"path/filepath"
"strings"

"github.com/devzero-inc/local-developer-analytics/collector"
"github.com/devzero-inc/local-developer-analytics/config"
"github.com/devzero-inc/local-developer-analytics/database"
"github.com/devzero-inc/local-developer-analytics/logging"
"github.com/devzero-inc/local-developer-analytics/util"

"github.com/manifoldco/promptui"
)

Expand Down
3 changes: 2 additions & 1 deletion util/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package util
import (
"bufio"
"fmt"
"lda/logging"
"os"
"os/user"
"path/filepath"
"strconv"
"strings"

"github.com/devzero-inc/local-developer-analytics/logging"
)

// FileExists checks if a file exists or not
Expand Down

0 comments on commit 7d6d2f5

Please sign in to comment.