Skip to content

Commit

Permalink
chore(repo): Init the Golang-based proxy structure
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Feb 17, 2024
1 parent ed08cd6 commit 71e7ce7
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.go]
max_line_length = 88
indent_style = tab
indent_size = 4

[*.py]
max_line_length = 88

[*.{py,rst,md}]
indent_style = space
indent_size = 4

[.travis.yml]
indent_style = space
indent_size = 2
23 changes: 23 additions & 0 deletions src/qedis-proxy/cmd/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package cmd

import (
"fmt"
"os"

"github.com/spf13/cobra"
)

var rootCmd = &cobra.Command{
// TODO: add commands
}

func init() {
// TODO: add command options
}

func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}
}
10 changes: 10 additions & 0 deletions src/qedis-proxy/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module qedis/proxy

go 1.20

require github.com/spf13/cobra v1.6.1

require (
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
)
10 changes: 10 additions & 0 deletions src/qedis-proxy/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc=
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
9 changes: 9 additions & 0 deletions src/qedis-proxy/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package main

import (
"qedis/proxy/cmd"
)

func main() {
cmd.Execute()
}

0 comments on commit 71e7ce7

Please sign in to comment.