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

refactor: change name of go module #46

Merged
merged 26 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c67f767
feat!: initial commit for codegen CLI with golang support
anghelflorinm Sep 10, 2024
ec78985
docs!: add comments to few missing exported functions
anghelflorinm Sep 10, 2024
32f8069
refactor!: add better error messages for the CLI
anghelflorinm Sep 10, 2024
e4b02d0
refactor: move package to the top of the repository
anghelflorinm Sep 24, 2024
47889fc
refactor: move main file to top directory
anghelflorinm Sep 24, 2024
e5620ed
refactor: embed flag manifest schema into the script
anghelflorinm Sep 26, 2024
faf47d4
Merge branch 'main' into 2-cli-prototype
anghelflorinm Sep 26, 2024
9b8ddd8
fix: remove files after being moved
anghelflorinm Sep 26, 2024
5bdfc10
refactor: move main.go back into SRC and attach module to flagmanifes…
anghelflorinm Sep 30, 2024
896ac8d
Merge remote-tracking branch 'origin' into 2-cli-prototype
anghelflorinm Oct 1, 2024
a5059d0
refactor: change property names in manifest to camel case format
anghelflorinm Oct 1, 2024
01240cc
refactor: change property names to camel case
anghelflorinm Oct 1, 2024
301a51b
Merge remote-tracking branch 'origin' into 2-cli-prototype
anghelflorinm Oct 2, 2024
9c37b8f
Merge remote-tracking branch 'origin' into 2-cli-prototype
anghelflorinm Oct 3, 2024
96b2139
Merge remote-tracking branch 'origin' into 2-cli-prototype
anghelflorinm Oct 7, 2024
c766e83
refactor: change folder, package structure; integrate with cobra
anghelflorinm Oct 9, 2024
087b76b
chore: delete comment; this has been replaced with Git project issue
anghelflorinm Oct 10, 2024
36124c8
chore: update internal/generate/plugins/golang/golang.tmpl
anghelflorinm Oct 10, 2024
d858654
Merge remote-tracking branch 'origin' into 2-cli-prototype
anghelflorinm Oct 23, 2024
97cdaff
test: add small tests for generate command for go and react with in m…
anghelflorinm Oct 29, 2024
4682490
Merge branch '2-cli-prototype' of https://github.com/open-feature/cod…
anghelflorinm Oct 29, 2024
09f0ac5
chore: update cmd/generate/generate_test.go
anghelflorinm Oct 30, 2024
6509bda
chore: update cmd/generate/generate_test.go
anghelflorinm Oct 30, 2024
4566a03
refactor: change name of module for codegen to github.com/open-featur…
anghelflorinm Oct 31, 2024
b541af5
Merge remote-tracking branch 'origin' into 45-change-name-of-go-module
anghelflorinm Oct 31, 2024
0f2bfd9
Merge branch 'main' into 45-change-name-of-go-module
beeme1mr Oct 31, 2024
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
6 changes: 3 additions & 3 deletions cmd/generate/generate.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package generate

import (
"codegen/cmd/generate/golang"
"codegen/cmd/generate/react"
"codegen/internal/flagkeys"
"github.com/open-feature/cli/cmd/generate/golang"
"github.com/open-feature/cli/cmd/generate/react"
"github.com/open-feature/cli/internal/flagkeys"

"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down
3 changes: 2 additions & 1 deletion cmd/generate/generate_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package generate

import (
"codegen/internal/flagkeys"
"os"
"path/filepath"
"testing"

"github.com/open-feature/cli/internal/flagkeys"

"github.com/google/go-cmp/cmp"

"github.com/spf13/afero"
Expand Down
6 changes: 3 additions & 3 deletions cmd/generate/golang/golang.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package golang

import (
"codegen/internal/flagkeys"
"codegen/internal/generate"
"codegen/internal/generate/plugins/golang"
"github.com/open-feature/cli/internal/flagkeys"
"github.com/open-feature/cli/internal/generate"
"github.com/open-feature/cli/internal/generate/plugins/golang"

"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down
4 changes: 2 additions & 2 deletions cmd/generate/react/react.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package react

import (
"codegen/internal/generate"
"codegen/internal/generate/plugins/react"
"github.com/open-feature/cli/internal/generate"
"github.com/open-feature/cli/internal/generate/plugins/react"

"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

"codegen/cmd/generate"
"github.com/open-feature/cli/cmd/generate"

"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion docs/schema/v0/flagmanifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ import _ "embed"
var Schema string

// SchemaPath proviees the current path and version of flag manifest.
const SchemaPath = "codegen/docs/schema/v0/flag_manifest.json"
const SchemaPath = "github.com/open-feature/cli/docs/schema/v0/flag_manifest.json"
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module codegen
module github.com/open-feature/cli

go 1.22.5

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

import (
"codegen/internal/flagkeys"
"github.com/open-feature/cli/internal/flagkeys"

"github.com/spf13/afero"
"github.com/spf13/viper"
Expand Down
9 changes: 5 additions & 4 deletions internal/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ package generate

import (
"bytes"
"codegen/internal/filesystem"
"codegen/internal/flagkeys"
"codegen/internal/generate/manifestutils"
"codegen/internal/generate/types"
"fmt"
"path"
"path/filepath"
"text/template"

"github.com/open-feature/cli/internal/filesystem"
"github.com/open-feature/cli/internal/flagkeys"
"github.com/open-feature/cli/internal/generate/manifestutils"
"github.com/open-feature/cli/internal/generate/types"

"github.com/spf13/viper"
)

Expand Down
9 changes: 5 additions & 4 deletions internal/generate/manifestutils/manifestutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
package manifestutils

import (
flagmanifest "codegen/docs/schema/v0"
"codegen/internal/filesystem"
"codegen/internal/flagkeys"
"codegen/internal/generate/types"
"encoding/json"
"fmt"
"sort"
"strconv"

flagmanifest "github.com/open-feature/cli/docs/schema/v0"
"github.com/open-feature/cli/internal/filesystem"
"github.com/open-feature/cli/internal/flagkeys"
"github.com/open-feature/cli/internal/generate/types"

"github.com/santhosh-tekuri/jsonschema/v5"
"github.com/spf13/afero"
"github.com/spf13/viper"
Expand Down
4 changes: 2 additions & 2 deletions internal/generate/plugins/golang/golang.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"strconv"
"text/template"

"codegen/internal/generate"
"codegen/internal/generate/types"
"github.com/open-feature/cli/internal/generate"
"github.com/open-feature/cli/internal/generate/types"

"github.com/iancoleman/strcase"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/generate/plugins/react/react.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"strconv"
"text/template"

"codegen/internal/generate"
"codegen/internal/generate/types"
"github.com/open-feature/cli/internal/generate"
"github.com/open-feature/cli/internal/generate/types"

"github.com/iancoleman/strcase"
)
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package main

import "codegen/cmd"
import "github.com/open-feature/cli/cmd"

var (
// Overridden by Go Releaser at build time
Expand Down