diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 77434b4..c674c6c 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -44,13 +44,13 @@ features, by not reporting duplicate issues. Providing the following information - **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be causing the problem (line of code or commit) -You can file new issues by providing the above information at the corresponding repository's issues link: https://github.com/ks6088ts/template-go/issues/new. +You can file new issues by providing the above information at the corresponding repository's issues link: https://github.com/ks6088ts-labs/sandbox-go/issues/new. ### Submitting a Pull Request (PR) Before you submit your Pull Request (PR) consider the following guidelines: -- Search the repository https://github.com/ks6088ts/template-go/pulls for an open or closed PR that relates to your submission. You don't want to duplicate effort. +- Search the repository https://github.com/ks6088ts-labs/sandbox-go/pulls for an open or closed PR that relates to your submission. You don't want to duplicate effort. - Make your changes in a new git fork - Commit your changes using a descriptive commit message diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 7dd5fdd..698a4cf 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: false contact_links: - name: Support Request - url: https://github.com/ks6088ts/template-go/issues + url: https://github.com/ks6088ts-labs/sandbox-go/issues about: Create an issue for support request or question relating to this repository diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 3f70d7a..95c7b5a 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -42,8 +42,8 @@ What kind of change does this Pull Request introduce? - Get the code ``` -git clone git@github.com:ks6088ts/template-go.git -cd template-go +git clone git@github.com:ks6088ts-labs/sandbox-go.git +cd sandbox-go ``` - Test the code diff --git a/.github/workflows/docker-release.yaml b/.github/workflows/docker-release.yaml index 24b99a0..6bac8eb 100644 --- a/.github/workflows/docker-release.yaml +++ b/.github/workflows/docker-release.yaml @@ -37,5 +37,5 @@ jobs: GIT_REVISION=${{ github.sha }} GIT_TAG=${{steps.set_version.outputs.no-dash}} tags: | - ${{ secrets.DOCKERHUB_USERNAME }}/template-go:${{steps.set_version.outputs.no-dash}} - ${{ secrets.DOCKERHUB_USERNAME }}/template-go:latest + ${{ secrets.DOCKERHUB_USERNAME }}/sandbox-go:${{steps.set_version.outputs.no-dash}} + ${{ secrets.DOCKERHUB_USERNAME }}/sandbox-go:latest diff --git a/.github/workflows/ghcr-release.yaml b/.github/workflows/ghcr-release.yaml index e74ed82..554ed5a 100644 --- a/.github/workflows/ghcr-release.yaml +++ b/.github/workflows/ghcr-release.yaml @@ -4,7 +4,7 @@ on: tags: - "v*" env: - IMAGE_NAME: template-go + IMAGE_NAME: sandbox-go jobs: ghcr: runs-on: ubuntu-latest diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 0add2f1..956f38f 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -16,21 +16,21 @@ builds: - darwin goarch: - amd64 - - '386' + - "386" - arm - arm64 ignore: - goos: darwin - goarch: '386' + goarch: "386" flags: - -trimpath ldflags: - - '-s -w -X github.com/ks6088ts/template-go/internal.Version={{.Version}} -X github.com/ks6088ts/template-go/internal.Revision={{.Commit}}' - binary: '{{ .ProjectName }}_v{{ .Version }}' + - "-s -w -X github.com/ks6088ts-labs/sandbox-go/internal.Version={{.Version}} -X github.com/ks6088ts-labs/sandbox-go/internal.Revision={{.Commit}}" + binary: "{{ .ProjectName }}_v{{ .Version }}" archives: - format: tar.gz - name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}' + name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" # use zip for windows archives format_overrides: - goos: windows diff --git a/Makefile b/Makefile index e087eb4..6d417b6 100644 --- a/Makefile +++ b/Makefile @@ -7,13 +7,13 @@ GOOS ?= $(shell go env GOOS) GOARCH ?= $(shell go env GOARCH) GOBUILD ?= GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=0 go build LDFLAGS ?= '-s -w \ - -X "github.com/ks6088ts/template-go/internal.Revision=$(GIT_REVISION)" \ - -X "github.com/ks6088ts/template-go/internal.Version=$(GIT_TAG)" \ + -X "github.com/ks6088ts-labs/sandbox-go/internal.Revision=$(GIT_REVISION)" \ + -X "github.com/ks6088ts-labs/sandbox-go/internal.Version=$(GIT_TAG)" \ ' # Docker DOCKER_REPO_NAME ?= ks6088ts -DOCKER_IMAGE_NAME ?= template-go +DOCKER_IMAGE_NAME ?= sandbox-go DOCKER_COMMAND ?= /app # Tools @@ -23,7 +23,7 @@ TRIVY_VERSION ?= 0.49.1 # Misc OUTPUT_DIR ?= dist -OUTPUT ?= $(OUTPUT_DIR)/template-go +OUTPUT ?= $(OUTPUT_DIR)/sandbox-go .PHONY: help help: @@ -54,6 +54,7 @@ test: ## run tests .PHONY: build build: ## build applications + go mod tidy mkdir -p $(OUTPUT_DIR) $(GOBUILD) -ldflags=$(LDFLAGS) -trimpath -o $(OUTPUT) . diff --git a/README.md b/README.md index 5897c58..9c8f3e8 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -[![test](https://github.com/ks6088ts/template-go/actions/workflows/test.yaml/badge.svg?branch=main)](https://github.com/ks6088ts/template-go/actions/workflows/test.yaml?query=branch%3Amain) -[![release](https://github.com/ks6088ts/template-go/actions/workflows/release.yaml/badge.svg)](https://github.com/ks6088ts/template-go/actions/workflows/release.yaml) -[![Go Report Card](https://goreportcard.com/badge/github.com/ks6088ts/template-go)](https://goreportcard.com/report/github.com/ks6088ts/template-go) -[![Go Reference](https://pkg.go.dev/badge/github.com/ks6088ts/template-go.svg)](https://pkg.go.dev/github.com/ks6088ts/template-go) +[![test](https://github.com/ks6088ts-labs/sandbox-go/actions/workflows/test.yaml/badge.svg?branch=main)](https://github.com/ks6088ts-labs/sandbox-go/actions/workflows/test.yaml?query=branch%3Amain) +[![release](https://github.com/ks6088ts-labs/sandbox-go/actions/workflows/release.yaml/badge.svg)](https://github.com/ks6088ts-labs/sandbox-go/actions/workflows/release.yaml) +[![Go Report Card](https://goreportcard.com/badge/github.com/ks6088ts-labs/sandbox-go)](https://goreportcard.com/report/github.com/ks6088ts-labs/sandbox-go) +[![Go Reference](https://pkg.go.dev/badge/github.com/ks6088ts-labs/sandbox-go.svg)](https://pkg.go.dev/github.com/ks6088ts-labs/sandbox-go) -[![docker](https://github.com/ks6088ts/template-go/actions/workflows/docker.yaml/badge.svg?branch=main)](https://github.com/ks6088ts/template-go/actions/workflows/docker.yaml?query=branch%3Amain) -[![docker-release](https://github.com/ks6088ts/template-go/actions/workflows/docker-release.yaml/badge.svg)](https://github.com/ks6088ts/template-go/actions/workflows/docker-release.yaml) -[![ghcr-release](https://github.com/ks6088ts/template-go/actions/workflows/ghcr-release.yaml/badge.svg)](https://github.com/ks6088ts/template-go/actions/workflows/ghcr-release.yaml) +[![docker](https://github.com/ks6088ts-labs/sandbox-go/actions/workflows/docker.yaml/badge.svg?branch=main)](https://github.com/ks6088ts-labs/sandbox-go/actions/workflows/docker.yaml?query=branch%3Amain) +[![docker-release](https://github.com/ks6088ts-labs/sandbox-go/actions/workflows/docker-release.yaml/badge.svg)](https://github.com/ks6088ts-labs/sandbox-go/actions/workflows/docker-release.yaml) +[![ghcr-release](https://github.com/ks6088ts-labs/sandbox-go/actions/workflows/ghcr-release.yaml/badge.svg)](https://github.com/ks6088ts-labs/sandbox-go/actions/workflows/ghcr-release.yaml) -# template-go +# sandbox-go A GitHub template repository for Go diff --git a/cmd/aoai/aoai.go b/cmd/aoai/aoai.go new file mode 100644 index 0000000..4638867 --- /dev/null +++ b/cmd/aoai/aoai.go @@ -0,0 +1,43 @@ +/* +Copyright © 2024 ks6088ts + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ +package aoai + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +// aoaiCmd represents the aoai command +var aoaiCmd = &cobra.Command{ + Use: "aoai", + Short: "A command for Azure OpenAI Service", + Long: `This is a command for Azure OpenAI Service. +ref. https://learn.microsoft.com/azure/ai-services/openai/overview`, + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("aoai called") + }, +} + +func GetCommand() *cobra.Command { + return aoaiCmd +} diff --git a/cmd/aoai/chatCompletion.go b/cmd/aoai/chatCompletion.go new file mode 100644 index 0000000..ebc35d1 --- /dev/null +++ b/cmd/aoai/chatCompletion.go @@ -0,0 +1,129 @@ +/* +Copyright © 2024 ks6088ts + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ +package aoai + +import ( + "context" + "fmt" + "log" + "os" + + "github.com/Azure/azure-sdk-for-go/sdk/ai/azopenai" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/spf13/cobra" +) + +// chatCompletionCmd represents the chatCompletion command +var chatCompletionCmd = &cobra.Command{ + Use: "chatCompletion", + Short: "A command for Azure OpenAI Service Chat Completion", + Long: `ref. https://learn.microsoft.com/azure/ai-services/openai/chatgpt-quickstart?tabs=command-line%2Cpython-new&pivots=programming-language-go`, + Run: func(cmd *cobra.Command, args []string) { + // get the values of the flags + modelDeploymentID, err := cmd.Flags().GetString("modelDeploymentID") + if err != nil { + fmt.Fprintf(os.Stderr, "Error: %v\n", err) + return + } + azureOpenAIEndpoint, err := cmd.Flags().GetString("azureOpenAIEndpoint") + if err != nil { + fmt.Fprintf(os.Stderr, "Error: %v\n", err) + return + } + azureOpenAIKey, err := cmd.Flags().GetString("azureOpenAIKey") + if err != nil { + fmt.Fprintf(os.Stderr, "Error: %v\n", err) + return + } + message, err := cmd.Flags().GetString("message") + if err != nil { + fmt.Fprintf(os.Stderr, "Error: %v\n", err) + return + } + + keyCredential := azcore.NewKeyCredential(azureOpenAIKey) + + client, err := azopenai.NewClientWithKeyCredential(azureOpenAIEndpoint, keyCredential, nil) + + if err != nil { + log.Printf("ERROR: %s", err) + return + } + + messages := []azopenai.ChatRequestMessageClassification{ + &azopenai.ChatRequestSystemMessage{Content: to.Ptr("You are a helpful assistant.")}, + &azopenai.ChatRequestUserMessage{Content: azopenai.NewChatRequestUserMessageContent(message)}, + } + + gotReply := false + + resp, err := client.GetChatCompletions(context.TODO(), azopenai.ChatCompletionsOptions{ + Messages: messages, + DeploymentName: &modelDeploymentID, + }, nil) + + if err != nil { + log.Printf("ERROR: %s", err) + return + } + + for _, choice := range resp.Choices { + gotReply = true + + if choice.ContentFilterResults != nil { + fmt.Fprintf(os.Stderr, "Content filter results\n") + + if choice.ContentFilterResults.Error != nil { + fmt.Fprintf(os.Stderr, " Error:%v\n", choice.ContentFilterResults.Error) + } + + fmt.Fprintf(os.Stderr, " Hate: sev: %v, filtered: %v\n", *choice.ContentFilterResults.Hate.Severity, *choice.ContentFilterResults.Hate.Filtered) + fmt.Fprintf(os.Stderr, " SelfHarm: sev: %v, filtered: %v\n", *choice.ContentFilterResults.SelfHarm.Severity, *choice.ContentFilterResults.SelfHarm.Filtered) + fmt.Fprintf(os.Stderr, " Sexual: sev: %v, filtered: %v\n", *choice.ContentFilterResults.Sexual.Severity, *choice.ContentFilterResults.Sexual.Filtered) + fmt.Fprintf(os.Stderr, " Violence: sev: %v, filtered: %v\n", *choice.ContentFilterResults.Violence.Severity, *choice.ContentFilterResults.Violence.Filtered) + } + + if choice.Message != nil && choice.Message.Content != nil { + fmt.Fprintf(os.Stderr, "Content[%d]: %s\n", *choice.Index, *choice.Message.Content) + } + + if choice.FinishReason != nil { + // this choice's conversation is complete. + fmt.Fprintf(os.Stderr, "Finish reason[%d]: %s\n", *choice.Index, *choice.FinishReason) + } + } + + if gotReply { + fmt.Fprintf(os.Stderr, "Received chat completions reply\n") + } + }, +} + +func init() { + aoaiCmd.AddCommand(chatCompletionCmd) + + chatCompletionCmd.Flags().StringP("modelDeploymentID", "d", "gpt-4o", "Model Deployment ID") + chatCompletionCmd.Flags().StringP("azureOpenAIEndpoint", "e", "", "Azure OpenAI Endpoint") + chatCompletionCmd.Flags().StringP("azureOpenAIKey", "k", "", "Azure OpenAI Key") + chatCompletionCmd.Flags().StringP("message", "m", "Hello, how are you?", "Message") +} diff --git a/cmd/root.go b/cmd/root.go index 6a2309e..f1bc9f3 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -25,7 +25,9 @@ import ( "fmt" "os" - "github.com/ks6088ts/template-go/cmd/sandbox" + "github.com/ks6088ts-labs/sandbox-go/cmd/aoai" + + "github.com/ks6088ts-labs/sandbox-go/cmd/sandbox" "github.com/spf13/cobra" "github.com/spf13/viper" ) @@ -34,7 +36,7 @@ var cfgFile string // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ - Use: "template-go", + Use: "sandbox-go", Short: "A brief description of your application", Long: `A longer description that spans multiple lines and likely contains examples and usage of using your application. For example: @@ -63,7 +65,7 @@ func init() { // Cobra supports persistent flags, which, if defined here, // will be global for your application. - rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.template-go.yaml)") + rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.sandbox-go.yaml)") // Cobra also supports local flags, which will only run // when this action is called directly. @@ -83,10 +85,10 @@ func initConfig() { home, err := os.UserHomeDir() cobra.CheckErr(err) - // Search config in home directory with name ".template-go" (without extension). + // Search config in home directory with name ".sandbox-go" (without extension). viper.AddConfigPath(home) viper.SetConfigType("yaml") - viper.SetConfigName(".template-go") + viper.SetConfigName(".sandbox-go") } viper.AutomaticEnv() // read in environment variables that match @@ -100,5 +102,6 @@ func initConfig() { // registerSubCommands registers sub commands func registerSubCommands() { rootCmd.AddCommand(sandbox.GetCommand()) + rootCmd.AddCommand(aoai.GetCommand()) // Add other sub commands here } diff --git a/cmd/version.go b/cmd/version.go index 91a646f..a910443 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -24,7 +24,7 @@ package cmd import ( "fmt" - "github.com/ks6088ts/template-go/internal" + "github.com/ks6088ts-labs/sandbox-go/internal" "github.com/spf13/cobra" ) diff --git a/go.mod b/go.mod index f9d95bf..4a5250d 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,16 @@ -module github.com/ks6088ts/template-go +module github.com/ks6088ts-labs/sandbox-go go 1.22.5 require ( + github.com/Azure/azure-sdk-for-go/sdk/ai/azopenai v0.6.2 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0 + github.com/spf13/cobra v1.8.1 + github.com/spf13/viper v1.19.0 +) + +require ( + github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -14,15 +22,14 @@ require ( github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect - github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.19.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.9.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/net v0.27.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/text v0.16.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 55808a3..b652d52 100644 --- a/go.sum +++ b/go.sum @@ -1,19 +1,51 @@ +github.com/Azure/azure-sdk-for-go/sdk/ai/azopenai v0.6.2 h1:Cx/DLZDK2Gaew4y+P1+CsegTonTMrwQIUz8RZvjQt3I= +github.com/Azure/azure-sdk-for-go/sdk/ai/azopenai v0.6.2/go.mod h1:JVVfPiAgcVJ6HrD3A4CRryuEb5rFJAZ4nFYnUFsj6vs= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0 h1:nyQWyZvwGTvunIMxi1Y9uXkcyr+I7TeNrr/foo4Kpk8= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0/go.mod h1:l38EPgmsp71HHLq9j7De57JcKOWPyhrsW1Awm1JS6K0= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 h1:tfLQ34V6F7tVSwoTf/4lH5sE0o6eCJuNDTmH09nDpbc= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= +github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= @@ -39,6 +71,7 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= @@ -46,13 +79,19 @@ go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/main.go b/main.go index b3a3627..15560cc 100644 --- a/main.go +++ b/main.go @@ -21,7 +21,7 @@ THE SOFTWARE. */ package main -import "github.com/ks6088ts/template-go/cmd" +import "github.com/ks6088ts-labs/sandbox-go/cmd" func main() { cmd.Execute()