grim/hgkeeper
Clone
Summary
Browse
Changes
Graph
closing merged branch
styling
2019-04-18, Gary Kramlich
110f88f716e7
closing merged branch
package
ssh
type
ServeCommand
struct
{
Addr
string
`kong:"flag,name='listen-addr',short='l',help='what address to listen on',default=':22222'"`
HostKeysPath
string
`kong:"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
}