Skip to content

Commit

Permalink
updated package
Browse files Browse the repository at this point in the history
  • Loading branch information
ugol committed Aug 20, 2024
1 parent 1d49b18 commit 2e0a862
Show file tree
Hide file tree
Showing 32 changed files with 65 additions and 65 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY . .
RUN go install github.com/actgardner/gogen-avro/v10/cmd/...@latest
RUN go generate pkg/generator/generate.go
RUN go get -u -d -v
RUN CGO_ENABLED=1 GOOS=linux go build -tags static_all -v -ldflags="-X 'github.com/ugol/jr/pkg/cmd.Version=${VERSION}' -X 'github.com/ugol/jr/pkg/cmd.GoVersion=${GOVERSION}' -X 'github.com/ugol/jr/pkg/cmd.BuildUser=${USER}' -X 'github.com/ugol/jr/pkg/cmd.BuildTime=${TIME}'" -o build/jr jr.go
RUN CGO_ENABLED=1 GOOS=linux go build -tags static_all -v -ldflags="-X 'github.com/jrnd-io/jr/pkg/cmd.Version=${VERSION}' -X 'github.com/jrnd-io/jr/pkg/cmd.GoVersion=${GOVERSION}' -X 'github.com/jrnd-io/jr/pkg/cmd.BuildUser=${USER}' -X 'github.com/jrnd-io/jr/pkg/cmd.BuildTime=${TIME}'" -o build/jr jr.go

FROM registry.access.redhat.com/ubi9/ubi-micro

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ WORKDIR /go/src/github.com/ugol/jr
COPY . .

RUN go get -u -d -v
RUN CGO_ENABLED=1 GOOS=linux go build -tags musl -v -ldflags="-X 'github.com/ugol/jr/cmd.Version=${VERSION}' 'github.com/ugol/jr/pkg/cmd.GoVersion=${GOVERSION}' -X 'github.com/ugol/jr/cmd.BuildUser=${USER}' -X 'github.com/ugol/jr/cmd.BuildTime=${TIME}'" -o build/jr jr.go
RUN CGO_ENABLED=1 GOOS=linux go build -tags musl -v -ldflags="-X 'github.com/jrnd-io/jr/cmd.Version=${VERSION}' 'github.com/jrnd-io/jr/pkg/cmd.GoVersion=${GOVERSION}' -X 'github.com/jrnd-io/jr/cmd.BuildUser=${USER}' -X 'github.com/jrnd-io/jr/cmd.BuildTime=${TIME}'" -o build/jr jr.go

FROM alpine
COPY --from=builder /etc/passwd /etc/passwd
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.scratch
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ COPY . .
RUN go get -u -d -v
RUN CGO_ENABLED=1 GOOS=linux go build \
-tags musl -v \
-ldflags="-X 'github.com/ugol/jr/cmd.Version=${VERSION}' 'github.com/ugol/jr/pkg/cmd.GoVersion=${GOVERSION}' -X 'github.com/ugol/jr/cmd.BuildUser=${USER}' -X 'github.com/ugol/jr/cmd.BuildTime=${TIME}' -linkmode external -w -s -extldflags '-static'" \
-ldflags="-X 'github.com/jrnd-io/jr/cmd.Version=${VERSION}' 'github.com/jrnd-io/jr/pkg/cmd.GoVersion=${GOVERSION}' -X 'github.com/jrnd-io/jr/cmd.BuildUser=${USER}' -X 'github.com/ugol/jr/cmd.BuildTime=${TIME}' -linkmode external -w -s -extldflags '-static'" \
-a -o build/jr jr.go

FROM scratch
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ generate:

compile:
@echo "Compiling"
go build -v -ldflags="-X 'github.com/ugol/jr/pkg/cmd.Version=$(VERSION)' \
-X 'github.com/ugol/jr/pkg/cmd.GoVersion=$(GOVERSION)' \
-X 'github.com/ugol/jr/pkg/cmd.BuildUser=$(USER)' \
-X 'github.com/ugol/jr/pkg/cmd.BuildTime=$(TIME)'" \
go build -v -ldflags="-X 'github.com/jrnd-io/jr/pkg/cmd.Version=$(VERSION)' \
-X 'github.com/jrnd-io/jr/pkg/cmd.GoVersion=$(GOVERSION)' \
-X 'github.com/jrnd-io/jr/pkg/cmd.BuildUser=$(USER)' \
-X 'github.com/jrnd-io/jr/pkg/cmd.BuildTime=$(TIME)'" \
-o build/jr jr.go

run: compile
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 github.com/ugol/jr
module github.com/jrnd-io/jr

go 1.22.4

Expand Down
2 changes: 1 addition & 1 deletion jr.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Using --duration option you can time bound the entire object creation. This exam
package main

import (
"github.com/ugol/jr/pkg/cmd"
"github.com/jrnd-io/jr/pkg/cmd"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/createTopic.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
package cmd

import (
"github.com/jrnd-io/jr/pkg/constants"
"github.com/jrnd-io/jr/pkg/producers/kafka"
"github.com/spf13/cobra"
"github.com/ugol/jr/pkg/constants"
"github.com/ugol/jr/pkg/producers/kafka"
)

var createTopicCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/emitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
package cmd

import (
"github.com/jrnd-io/jr/pkg/emitter"
"github.com/spf13/cobra"
"github.com/ugol/jr/pkg/emitter"
)

var emitterCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/emitterRun.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
package cmd

import (
"github.com/jrnd-io/jr/pkg/emitter"
"github.com/spf13/cobra"
"github.com/ugol/jr/pkg/emitter"
)

var emitterRunCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/functionList.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ package cmd

import (
"fmt"
"github.com/jrnd-io/jr/pkg/functions"
"github.com/spf13/cobra"
"github.com/ugol/jr/pkg/functions"
"os"
"os/exec"
"slices"
Expand Down
6 changes: 3 additions & 3 deletions pkg/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ import (
"strings"
"time"

"github.com/jrnd-io/jr/pkg/configuration"
"github.com/jrnd-io/jr/pkg/constants"
"github.com/jrnd-io/jr/pkg/functions"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/spf13/viper"
"github.com/ugol/jr/pkg/configuration"
"github.com/ugol/jr/pkg/constants"
"github.com/ugol/jr/pkg/functions"
)

var logLevel = constants.DEFAULT_LOG_LEVEL
Expand Down
8 changes: 4 additions & 4 deletions pkg/cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ import (
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
"github.com/gorilla/sessions"
"github.com/jrnd-io/jr/pkg/configuration"
"github.com/jrnd-io/jr/pkg/constants"
"github.com/jrnd-io/jr/pkg/emitter"
"github.com/jrnd-io/jr/pkg/functions"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/ugol/jr/pkg/configuration"
"github.com/ugol/jr/pkg/constants"
"github.com/ugol/jr/pkg/emitter"
"github.com/ugol/jr/pkg/functions"
)

//go:embed html/index.html
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/templateList.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ package cmd
import (
"bytes"
"fmt"
"github.com/jrnd-io/jr/pkg/constants"
"github.com/jrnd-io/jr/pkg/functions"
"github.com/spf13/cobra"
"github.com/ugol/jr/pkg/constants"
"github.com/ugol/jr/pkg/functions"
"os"
"path/filepath"
"strings"
Expand Down
8 changes: 4 additions & 4 deletions pkg/cmd/templateRun.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ package cmd
import (
"time"

"github.com/jrnd-io/jr/pkg/configuration"
"github.com/jrnd-io/jr/pkg/constants"
"github.com/jrnd-io/jr/pkg/emitter"
"github.com/jrnd-io/jr/pkg/functions"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/ugol/jr/pkg/configuration"
"github.com/ugol/jr/pkg/constants"
"github.com/ugol/jr/pkg/emitter"
"github.com/ugol/jr/pkg/functions"
)

var templateRunCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/templateShow.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"runtime"
"strings"

"github.com/jrnd-io/jr/pkg/constants"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/ugol/jr/pkg/constants"
)

var templateShowCmd = &cobra.Command{
Expand Down
34 changes: 17 additions & 17 deletions pkg/emitter/emitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,24 @@ import (
"os"
"time"

"github.com/jrnd-io/jr/pkg/configuration"
"github.com/jrnd-io/jr/pkg/constants"
"github.com/jrnd-io/jr/pkg/ctx"
"github.com/jrnd-io/jr/pkg/functions"
"github.com/jrnd-io/jr/pkg/producers/azblobstorage"
"github.com/jrnd-io/jr/pkg/producers/azcosmosdb"
"github.com/jrnd-io/jr/pkg/producers/cassandra"
"github.com/jrnd-io/jr/pkg/producers/console"
"github.com/jrnd-io/jr/pkg/producers/elastic"
"github.com/jrnd-io/jr/pkg/producers/gcs"
"github.com/jrnd-io/jr/pkg/producers/http"
"github.com/jrnd-io/jr/pkg/producers/kafka"
"github.com/jrnd-io/jr/pkg/producers/mongoDB"
"github.com/jrnd-io/jr/pkg/producers/redis"
"github.com/jrnd-io/jr/pkg/producers/s3"
"github.com/jrnd-io/jr/pkg/producers/server"
"github.com/jrnd-io/jr/pkg/tpl"
"github.com/rs/zerolog/log"
"github.com/ugol/jr/pkg/configuration"
"github.com/ugol/jr/pkg/constants"
"github.com/ugol/jr/pkg/ctx"
"github.com/ugol/jr/pkg/functions"
"github.com/ugol/jr/pkg/producers/azblobstorage"
"github.com/ugol/jr/pkg/producers/azcosmosdb"
"github.com/ugol/jr/pkg/producers/cassandra"
"github.com/ugol/jr/pkg/producers/console"
"github.com/ugol/jr/pkg/producers/elastic"
"github.com/ugol/jr/pkg/producers/gcs"
"github.com/ugol/jr/pkg/producers/http"
"github.com/ugol/jr/pkg/producers/kafka"
"github.com/ugol/jr/pkg/producers/mongoDB"
"github.com/ugol/jr/pkg/producers/redis"
"github.com/ugol/jr/pkg/producers/s3"
"github.com/ugol/jr/pkg/producers/server"
"github.com/ugol/jr/pkg/tpl"
)

type Emitter struct {
Expand Down
6 changes: 3 additions & 3 deletions pkg/emitter/loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ package emitter
import (
"context"
"fmt"
"github.com/ugol/jr/pkg/configuration"
"github.com/ugol/jr/pkg/ctx"
"github.com/ugol/jr/pkg/functions"
"github.com/jrnd-io/jr/pkg/configuration"
"github.com/jrnd-io/jr/pkg/ctx"
"github.com/jrnd-io/jr/pkg/functions"
"io"
"os"
"os/signal"
Expand Down
2 changes: 1 addition & 1 deletion pkg/functions/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ package functions

import (
"fmt"
"github.com/ugol/jr/pkg/ctx"
"github.com/jrnd-io/jr/pkg/ctx"
"math"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/functions/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import (
"text/template"

"github.com/google/uuid"
"github.com/jrnd-io/jr/pkg/constants"
"github.com/jrnd-io/jr/pkg/ctx"
"github.com/rs/zerolog/log"
"github.com/ugol/jr/pkg/constants"
"github.com/ugol/jr/pkg/ctx"
"golang.org/x/text/cases"
"golang.org/x/text/language"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/functions/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"regexp"
"text/template"

"github.com/jrnd-io/jr/pkg/ctx"
"github.com/rs/zerolog/log"
"github.com/ugol/jr/pkg/ctx"
)

func ExecuteTemplate(key *template.Template, value *template.Template, oneline bool) (string, string, error) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/functions/people.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"strconv"
"strings"

"github.com/jrnd-io/jr/pkg/ctx"
"github.com/squeeze69/generacodicefiscale"
"github.com/ugol/jr/pkg/ctx"

"github.com/rs/zerolog/log"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/functions/phone.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

package functions

import "github.com/ugol/jr/pkg/ctx"
import "github.com/jrnd-io/jr/pkg/ctx"

// CountryCode returns a random Country Code prefix
func CountryCode() string {
Expand Down
2 changes: 1 addition & 1 deletion pkg/functions/utilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package functions
import (
"fmt"
"github.com/google/uuid"
"github.com/ugol/jr/pkg/ctx"
"github.com/jrnd-io/jr/pkg/ctx"
)

// Counter creates a counter named c, starting from start and incrementing by step
Expand Down
2 changes: 1 addition & 1 deletion pkg/functions_test/finance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
package functions_test

import (
"github.com/ugol/jr/pkg/functions"
"github.com/jrnd-io/jr/pkg/functions"
"testing"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/functions_test/functions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ package functions_test
import (
"bytes"
"fmt"
"github.com/ugol/jr/pkg/ctx"
"github.com/ugol/jr/pkg/functions"
"github.com/jrnd-io/jr/pkg/ctx"
"github.com/jrnd-io/jr/pkg/functions"
"testing"
"text/template"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/functions_test/regex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
package functions_test

import (
"github.com/ugol/jr/pkg/functions"
"github.com/jrnd-io/jr/pkg/functions"
"regexp"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/functions_test/templates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"testing"
"text/template"

"github.com/ugol/jr/pkg/functions"
"github.com/jrnd-io/jr/pkg/functions"
)

func TestSimpleContext(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/producers/console/ConsoleProducer.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ package console

import (
"fmt"
"github.com/ugol/jr/pkg/tpl"
"github.com/jrnd-io/jr/pkg/tpl"
)

type ConsoleProducer struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/producers/http/producer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

"github.com/google/go-cmp/cmp"
"github.com/jarcoal/httpmock"
phttp "github.com/ugol/jr/pkg/producers/http"
phttp "github.com/jrnd-io/jr/pkg/producers/http"
)

var defaultBody = []byte("{\"property\": \"value\"}")
Expand Down
2 changes: 1 addition & 1 deletion pkg/producers/kafka/kafkaProducer.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import (
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/serde"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/serde/avrov2"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/serde/jsonschema"
"github.com/ugol/jr/pkg/types"
"github.com/jrnd-io/jr/pkg/types"

"github.com/rs/zerolog/log"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/producers/server/JsonProducer.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ package server
import (
"net/http"

"github.com/jrnd-io/jr/pkg/tpl"
"github.com/rs/zerolog/log"
"github.com/ugol/jr/pkg/tpl"
)

type JsonProducer struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/producers/test/TestProducer.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ package test
import (
"bytes"

"github.com/jrnd-io/jr/pkg/tpl"
"github.com/rs/zerolog/log"
"github.com/ugol/jr/pkg/tpl"
)

type TestProducer struct {
Expand Down

0 comments on commit 2e0a862

Please sign in to comment.