See how Boundary would look with gofumpt applied (#853)
* See how Boundary would look with https://github.com/mvdan/gofumpt applied Results of running `gofumpt -w -s .` * Update tools file and Makefile for gofumpt Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
This commit is contained in:
1 parent
cca0fbea2b
commit
94cb79bbdd
237 files changed
+1567
-1529
No files matched your search
@@ -17,8 +17,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*Command)(nil)
|
||||
var _ cli.CommandAutocomplete = (*Command)(nil)
|
||||
var (
|
||||
_ cli.Command = (*Command)(nil)
|
||||
_ cli.CommandAutocomplete = (*Command)(nil)
|
||||
)
|
||||
|
||||
type Command struct {
|
||||
*base.Command
|
||||
|
||||
@@ -16,8 +16,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*PasswordCommand)(nil)
|
||||
var _ cli.CommandAutocomplete = (*PasswordCommand)(nil)
|
||||
var (
|
||||
_ cli.Command = (*PasswordCommand)(nil)
|
||||
_ cli.CommandAutocomplete = (*PasswordCommand)(nil)
|
||||
)
|
||||
|
||||
type PasswordCommand struct {
|
||||
*base.Command
|
||||
|
||||
@@ -20,12 +20,16 @@ import (
|
||||
zkeyring "github.com/zalando/go-keyring"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*PasswordCommand)(nil)
|
||||
var _ cli.CommandAutocomplete = (*PasswordCommand)(nil)
|
||||
var (
|
||||
_ cli.Command = (*PasswordCommand)(nil)
|
||||
_ cli.CommandAutocomplete = (*PasswordCommand)(nil)
|
||||
)
|
||||
|
||||
var envPassword = "BOUNDARY_AUTHENTICATE_PASSWORD_PASSWORD"
|
||||
var envLoginName = "BOUNDARY_AUTHENTICATE_PASSWORD_LOGIN_NAME"
|
||||
var envAuthMethodId = "BOUNDARY_AUTHENTICATE_AUTH_METHOD_ID"
|
||||
var (
|
||||
envPassword = "BOUNDARY_AUTHENTICATE_PASSWORD_PASSWORD"
|
||||
envLoginName = "BOUNDARY_AUTHENTICATE_PASSWORD_LOGIN_NAME"
|
||||
envAuthMethodId = "BOUNDARY_AUTHENTICATE_AUTH_METHOD_ID"
|
||||
)
|
||||
|
||||
type PasswordCommand struct {
|
||||
*base.Command
|
||||
|
||||
@@ -14,8 +14,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*Command)(nil)
|
||||
var _ cli.CommandAutocomplete = (*Command)(nil)
|
||||
var (
|
||||
_ cli.Command = (*Command)(nil)
|
||||
_ cli.CommandAutocomplete = (*Command)(nil)
|
||||
)
|
||||
|
||||
type Command struct {
|
||||
*base.Command
|
||||
|
||||
@@ -14,8 +14,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*PasswordCommand)(nil)
|
||||
var _ cli.CommandAutocomplete = (*PasswordCommand)(nil)
|
||||
var (
|
||||
_ cli.Command = (*PasswordCommand)(nil)
|
||||
_ cli.CommandAutocomplete = (*PasswordCommand)(nil)
|
||||
)
|
||||
|
||||
type PasswordCommand struct {
|
||||
*base.Command
|
||||
|
||||
@@ -15,8 +15,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*Command)(nil)
|
||||
var _ cli.CommandAutocomplete = (*Command)(nil)
|
||||
var (
|
||||
_ cli.Command = (*Command)(nil)
|
||||
_ cli.CommandAutocomplete = (*Command)(nil)
|
||||
)
|
||||
|
||||
type Command struct {
|
||||
*base.Command
|
||||
|
||||
@@ -14,8 +14,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*EncryptDecryptCommand)(nil)
|
||||
var _ cli.CommandAutocomplete = (*EncryptDecryptCommand)(nil)
|
||||
var (
|
||||
_ cli.Command = (*EncryptDecryptCommand)(nil)
|
||||
_ cli.CommandAutocomplete = (*EncryptDecryptCommand)(nil)
|
||||
)
|
||||
|
||||
type EncryptDecryptCommand struct {
|
||||
*base.Command
|
||||
|
||||
@@ -61,7 +61,6 @@ func TestEncryptDecrypt(t *testing.T) {
|
||||
|
||||
for _, c := range cases {
|
||||
t.Run(fmt.Sprintf("Test encrypt %v", c.f), func(t *testing.T) {
|
||||
|
||||
var b bytes.Buffer
|
||||
|
||||
ui := &cli.BasicUi{
|
||||
|
||||
@@ -9,8 +9,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*TokenCommand)(nil)
|
||||
var _ cli.CommandAutocomplete = (*TokenCommand)(nil)
|
||||
var (
|
||||
_ cli.Command = (*TokenCommand)(nil)
|
||||
_ cli.CommandAutocomplete = (*TokenCommand)(nil)
|
||||
)
|
||||
|
||||
type TokenCommand struct {
|
||||
*base.Command
|
||||
|
||||
@@ -56,8 +56,10 @@ type TerminationInfo struct {
|
||||
Reason string `json:"termination_reason"`
|
||||
}
|
||||
|
||||
var _ cli.Command = (*Command)(nil)
|
||||
var _ cli.CommandAutocomplete = (*Command)(nil)
|
||||
var (
|
||||
_ cli.Command = (*Command)(nil)
|
||||
_ cli.CommandAutocomplete = (*Command)(nil)
|
||||
)
|
||||
|
||||
type Command struct {
|
||||
*base.Command
|
||||
@@ -648,7 +650,6 @@ func (c *Command) getWsConn(
|
||||
ctx context.Context,
|
||||
workerAddr string,
|
||||
transport *http.Transport) (*websocket.Conn, error) {
|
||||
|
||||
conn, resp, err := websocket.Dial(
|
||||
ctx,
|
||||
fmt.Sprintf("wss://%s/v1/proxy", workerAddr),
|
||||
@@ -687,7 +688,6 @@ func (c *Command) sendSessionTeardown(
|
||||
ctx context.Context,
|
||||
wsConn *websocket.Conn,
|
||||
tofuToken string) error {
|
||||
|
||||
handshake := proxy.ClientHandshake{
|
||||
TofuToken: tofuToken,
|
||||
Command: proxy.HANDSHAKECOMMAND_HANDSHAKECOMMAND_SESSION_CANCEL,
|
||||
|
||||
@@ -6,8 +6,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*Command)(nil)
|
||||
var _ cli.CommandAutocomplete = (*Command)(nil)
|
||||
var (
|
||||
_ cli.Command = (*Command)(nil)
|
||||
_ cli.CommandAutocomplete = (*Command)(nil)
|
||||
)
|
||||
|
||||
type Command struct {
|
||||
*base.Command
|
||||
|
||||
@@ -18,8 +18,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*InitCommand)(nil)
|
||||
var _ cli.CommandAutocomplete = (*InitCommand)(nil)
|
||||
var (
|
||||
_ cli.Command = (*InitCommand)(nil)
|
||||
_ cli.CommandAutocomplete = (*InitCommand)(nil)
|
||||
)
|
||||
|
||||
type InitCommand struct {
|
||||
*base.Command
|
||||
|
||||
@@ -21,8 +21,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*Command)(nil)
|
||||
var _ cli.CommandAutocomplete = (*Command)(nil)
|
||||
var (
|
||||
_ cli.Command = (*Command)(nil)
|
||||
_ cli.CommandAutocomplete = (*Command)(nil)
|
||||
)
|
||||
|
||||
type Command struct {
|
||||
*base.Server
|
||||
@@ -241,7 +243,7 @@ func (c *Command) Run(args []string) int {
|
||||
return 1
|
||||
}
|
||||
|
||||
//childShutdownCh := make(chan struct{})
|
||||
// childShutdownCh := make(chan struct{})
|
||||
|
||||
c.Config, err = config.DevCombined()
|
||||
if err != nil {
|
||||
|
||||
@@ -13,8 +13,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*Command)(nil)
|
||||
var _ cli.CommandAutocomplete = (*Command)(nil)
|
||||
var (
|
||||
_ cli.Command = (*Command)(nil)
|
||||
_ cli.CommandAutocomplete = (*Command)(nil)
|
||||
)
|
||||
|
||||
type Command struct {
|
||||
*base.Command
|
||||
|
||||
@@ -14,8 +14,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*Command)(nil)
|
||||
var _ cli.CommandAutocomplete = (*Command)(nil)
|
||||
var (
|
||||
_ cli.Command = (*Command)(nil)
|
||||
_ cli.CommandAutocomplete = (*Command)(nil)
|
||||
)
|
||||
|
||||
type Command struct {
|
||||
*base.Command
|
||||
|
||||
@@ -13,8 +13,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*StaticCommand)(nil)
|
||||
var _ cli.CommandAutocomplete = (*StaticCommand)(nil)
|
||||
var (
|
||||
_ cli.Command = (*StaticCommand)(nil)
|
||||
_ cli.CommandAutocomplete = (*StaticCommand)(nil)
|
||||
)
|
||||
|
||||
type StaticCommand struct {
|
||||
*base.Command
|
||||
|
||||
@@ -14,8 +14,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*Command)(nil)
|
||||
var _ cli.CommandAutocomplete = (*Command)(nil)
|
||||
var (
|
||||
_ cli.Command = (*Command)(nil)
|
||||
_ cli.CommandAutocomplete = (*Command)(nil)
|
||||
)
|
||||
|
||||
type Command struct {
|
||||
*base.Command
|
||||
|
||||
@@ -13,8 +13,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*StaticCommand)(nil)
|
||||
var _ cli.CommandAutocomplete = (*StaticCommand)(nil)
|
||||
var (
|
||||
_ cli.Command = (*StaticCommand)(nil)
|
||||
_ cli.CommandAutocomplete = (*StaticCommand)(nil)
|
||||
)
|
||||
|
||||
type StaticCommand struct {
|
||||
*base.Command
|
||||
|
||||
@@ -14,8 +14,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*Command)(nil)
|
||||
var _ cli.CommandAutocomplete = (*Command)(nil)
|
||||
var (
|
||||
_ cli.Command = (*Command)(nil)
|
||||
_ cli.CommandAutocomplete = (*Command)(nil)
|
||||
)
|
||||
|
||||
type Command struct {
|
||||
*base.Command
|
||||
|
||||
@@ -13,8 +13,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*StaticCommand)(nil)
|
||||
var _ cli.CommandAutocomplete = (*StaticCommand)(nil)
|
||||
var (
|
||||
_ cli.Command = (*StaticCommand)(nil)
|
||||
_ cli.CommandAutocomplete = (*StaticCommand)(nil)
|
||||
)
|
||||
|
||||
type StaticCommand struct {
|
||||
*base.Command
|
||||
|
||||
@@ -138,7 +138,6 @@ func generateRoleTableOutput(in *roles.Role) string {
|
||||
ret = append(ret,
|
||||
fmt.Sprintf(" %s", grant.Canonical),
|
||||
)
|
||||
|
||||
}
|
||||
return base.WrapForHelpText(ret)
|
||||
}
|
||||
@@ -14,8 +14,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*Command)(nil)
|
||||
var _ cli.CommandAutocomplete = (*Command)(nil)
|
||||
var (
|
||||
_ cli.Command = (*Command)(nil)
|
||||
_ cli.CommandAutocomplete = (*Command)(nil)
|
||||
)
|
||||
|
||||
type Command struct {
|
||||
*base.Command
|
||||
|
||||
@@ -14,8 +14,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*Command)(nil)
|
||||
var _ cli.CommandAutocomplete = (*Command)(nil)
|
||||
var (
|
||||
_ cli.Command = (*Command)(nil)
|
||||
_ cli.CommandAutocomplete = (*Command)(nil)
|
||||
)
|
||||
|
||||
type Command struct {
|
||||
*base.Command
|
||||
|
||||
@@ -20,8 +20,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*Command)(nil)
|
||||
var _ cli.CommandAutocomplete = (*Command)(nil)
|
||||
var (
|
||||
_ cli.Command = (*Command)(nil)
|
||||
_ cli.CommandAutocomplete = (*Command)(nil)
|
||||
)
|
||||
|
||||
type Command struct {
|
||||
*base.Server
|
||||
|
||||
@@ -14,8 +14,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*Command)(nil)
|
||||
var _ cli.CommandAutocomplete = (*Command)(nil)
|
||||
var (
|
||||
_ cli.Command = (*Command)(nil)
|
||||
_ cli.CommandAutocomplete = (*Command)(nil)
|
||||
)
|
||||
|
||||
type Command struct {
|
||||
*base.Command
|
||||
|
||||
@@ -15,8 +15,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*Command)(nil)
|
||||
var _ cli.CommandAutocomplete = (*Command)(nil)
|
||||
var (
|
||||
_ cli.Command = (*Command)(nil)
|
||||
_ cli.CommandAutocomplete = (*Command)(nil)
|
||||
)
|
||||
|
||||
type Command struct {
|
||||
*base.Command
|
||||
|
||||
@@ -15,8 +15,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*TcpCommand)(nil)
|
||||
var _ cli.CommandAutocomplete = (*TcpCommand)(nil)
|
||||
var (
|
||||
_ cli.Command = (*TcpCommand)(nil)
|
||||
_ cli.CommandAutocomplete = (*TcpCommand)(nil)
|
||||
)
|
||||
|
||||
type TcpCommand struct {
|
||||
*base.Command
|
||||
|
||||
@@ -13,8 +13,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*Command)(nil)
|
||||
var _ cli.CommandAutocomplete = (*Command)(nil)
|
||||
var (
|
||||
_ cli.Command = (*Command)(nil)
|
||||
_ cli.CommandAutocomplete = (*Command)(nil)
|
||||
)
|
||||
|
||||
type Command struct {
|
||||
*base.Command
|
||||
|
||||
@@ -9,8 +9,10 @@ import (
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
var _ cli.Command = (*Command)(nil)
|
||||
var _ cli.CommandAutocomplete = (*Command)(nil)
|
||||
var (
|
||||
_ cli.Command = (*Command)(nil)
|
||||
_ cli.CommandAutocomplete = (*Command)(nil)
|
||||
)
|
||||
|
||||
type Command struct {
|
||||
*base.Command
|
||||
|
||||
Reference in new issue
Block a user