grim/hgkeeper
Clone
Summary
Browse
Changes
Graph
closing merged branch
termdumb
2019-04-18, Gary Kramlich
50c6ec130656
closing merged branch
package
ssh
type
ServeCommand
struct
{
Addr
string
`flag name:"listen-addr" short:"l" help:"what address to listen on" default:":22222"`
HostKeysPath
string
`flag name:"host-keys-path" short:"-H" help:"the path where host keys are kept" default:"host-keys"`
}
func
(
c
*
ServeCommand
)
Run
(
reposPath
string
)
error
{
s
:=
NewServer
()
err
:=
s
.
loadHostKeys
(
c
.
HostKeysPath
)
if
err
!=
nil
{
return
err
}
err
=
s
.
Listen
(
c
.
Addr
)
if
err
!=
nil
{
return
err
}
return
nil
}