mirror of
https://github.com/openziti/zrok.git
synced 2025-06-20 01:37:52 +02: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/agentGrpc"
|
||||||
"github.com/openziti/zrok/agent/proctree"
|
"github.com/openziti/zrok/agent/proctree"
|
||||||
"github.com/openziti/zrok/environment"
|
"github.com/openziti/zrok/environment"
|
||||||
|
"github.com/openziti/zrok/sdk/golang/sdk"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
"os"
|
"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'?")
|
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}
|
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 {
|
for _, basicAuth := range req.BasicAuth {
|
||||||
shrCmd = append(shrCmd, "--basic-auth", basicAuth)
|
shrCmd = append(shrCmd, "--basic-auth", basicAuth)
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"github.com/openziti/zrok/environment"
|
"github.com/openziti/zrok/environment"
|
||||||
"github.com/openziti/zrok/tui"
|
"github.com/openziti/zrok/tui"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
"path/filepath"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -70,6 +71,16 @@ func (cmd *agentSharePublicCommand) run(_ *cobra.Command, args []string) {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
target = v
|
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()
|
root, err := environment.LoadRoot()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user