Skip to content

Commit

Permalink
Use wish options
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Sep 7, 2021
1 parent a378647 commit 9b3c681
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ func main() {
log.Fatalln(err)
}
s, err := wish.NewServer(
fmt.Sprintf("%s:%d", cfg.Host, cfg.Port),
cfg.KeyPath,
bm.Middleware(tui.SessionHandler(cfg.RepoPath, time.Second*5)),
gm.Middleware(cfg.RepoPath, cfg.RepoAuth, cfg.RepoAuthFile),
lm.Middleware(),
wish.WithAddress(fmt.Sprintf("%s:%d", cfg.Host, cfg.Port)),
wish.WithHostKeyPath(cfg.KeyPath),
wish.WithMiddlewares(
bm.Middleware(tui.SessionHandler(cfg.RepoPath, time.Second*5)),
gm.Middleware(cfg.RepoPath, cfg.RepoAuth, cfg.RepoAuthFile),
lm.Middleware(),
),
)
if err != nil {
log.Fatalln(err)
Expand Down

0 comments on commit 9b3c681

Please sign in to comment.