Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
maxlandon authored Dec 20, 2023
2 parents f2791a9 + 6f5f17c commit 5f78601
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ linters:
# - forbidigo # Forbids identifiers (style)
- forcetypeassert # finds forced type assertions (style)
- funlen # tool for detection of long functions (cplx)
- gci # Controls package import order and makes deterministic (fmt,import)
# - gci # Controls package import order and makes deterministic (fmt,import)
# - gochecknoglobals # checks that no global variables exist (style)
# - gochecknoinits # checks that no init functions are present (style)
- gocognit # computes and checks the cognitive complexity of functions (cplx)
Expand Down
1 change: 1 addition & 0 deletions client/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"sort"

"github.com/AlecAivazis/survey/v2"

"github.com/reeflective/team/internal/assets"
"github.com/reeflective/team/internal/certs"
"github.com/reeflective/team/internal/command"
Expand Down
14 changes: 12 additions & 2 deletions server/commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,12 @@ func serverCommands(server *server.Server, client *client.Client) *cobra.Command
closeComps.PositionalAnyCompletion(carapace.ActionCallback(listenerIDCompleter(client, server)))

closeComps.PreRun(func(cmd *cobra.Command, args []string) {
cmd.PersistentPreRunE(cmd, args)
if cmd.PersistentPreRunE != nil {
cmd.PersistentPreRunE(cmd, args)
}
if cmd.PreRunE != nil {
cmd.PreRunE(cmd, args)
}
})

teamCmd.AddCommand(closeCmd)
Expand Down Expand Up @@ -213,7 +218,12 @@ func serverCommands(server *server.Server, client *client.Client) *cobra.Command
rmUserComps.PositionalCompletion(carapace.ActionCallback(userCompleter(client, server)))

rmUserComps.PreRun(func(cmd *cobra.Command, args []string) {
cmd.PersistentPreRunE(cmd, args)
if cmd.PersistentPreRunE != nil {
cmd.PersistentPreRunE(cmd, args)
}
if cmd.PreRunE != nil {
cmd.PreRunE(cmd, args)
}
})

// Import a list of users and their credentials.
Expand Down
2 changes: 1 addition & 1 deletion server/commands/teamserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func daemoncmd(serv *server.Server) func(cmd *cobra.Command, args []string) erro
lport = uint16(serv.GetConfig().DaemonMode.Port)
}

fmt.Fprintf(cmd.OutOrStdout(), "Starting %s teamserver daemon on %s:%d ...", serv.Name(), lhost, lport)
fmt.Fprintf(cmd.OutOrStdout(), "Starting %s teamserver daemon on %s:%d ...\n", serv.Name(), lhost, lport)

// Blocking call, your program will only exit/resume on Ctrl-C/SIGTERM
return serv.ServeDaemon(lhost, lport)
Expand Down
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (ts *Server) ServeDaemon(host string, port uint16, opts ...Options) (err er

err = ts.ListenerStartPersistents()
if err != nil && hostPort.MatchString(err.Error()) {
log.Errorf("Error starting persistent listeners: %s", err)
log.Errorf("Error starting persistent listeners: %s\n", err)
}

done := make(chan bool)
Expand Down

0 comments on commit 5f78601

Please sign in to comment.