mirror of
https://github.com/openziti/zrok.git
synced 2024-12-23 07:09:12 +01:00
lint (#463)
This commit is contained in:
parent
054788cd18
commit
8525348d21
@ -6,6 +6,7 @@ import (
|
||||
"github.com/openziti/zrok/agent/agentGrpc"
|
||||
"github.com/openziti/zrok/agent/proctree"
|
||||
"github.com/openziti/zrok/environment"
|
||||
"github.com/openziti/zrok/sdk/golang/sdk"
|
||||
"github.com/sirupsen/logrus"
|
||||
"os"
|
||||
)
|
||||
@ -20,8 +21,12 @@ func (i *agentGrpcImpl) PublicShare(_ context.Context, req *agentGrpc.PublicShar
|
||||
return nil, errors.New("unable to load environment; did you 'zrok enable'?")
|
||||
}
|
||||
|
||||
shr := &share{ready: make(chan struct{})}
|
||||
shrCmd := []string{os.Args[0], "share", "public", "--agent", "-b", req.BackendMode}
|
||||
shr := &share{
|
||||
shareMode: sdk.PublicShareMode,
|
||||
backendMode: sdk.BackendMode(req.BackendMode),
|
||||
ready: make(chan struct{}),
|
||||
}
|
||||
|
||||
for _, basicAuth := range req.BasicAuth {
|
||||
shrCmd = append(shrCmd, "--basic-auth", basicAuth)
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"github.com/openziti/zrok/environment"
|
||||
"github.com/openziti/zrok/tui"
|
||||
"github.com/spf13/cobra"
|
||||
"path/filepath"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -70,6 +71,16 @@ func (cmd *agentSharePublicCommand) run(_ *cobra.Command, args []string) {
|
||||
panic(err)
|
||||
}
|
||||
target = v
|
||||
|
||||
case "web":
|
||||
var err error
|
||||
target, err = filepath.Abs(args[0])
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
default:
|
||||
target = args[0]
|
||||
}
|
||||
|
||||
root, err := environment.LoadRoot()
|
||||
|
Loading…
Reference in New Issue
Block a user