h.mu.Unlock()
}
-func (h Host) isOp(conn sshd.Connection) bool {
+func (h *Host) isOp(conn sshd.Connection) bool {
key := conn.PublicKey()
if key == nil {
return false
}
}
-func (h Host) completeName(partial string) string {
+func (h *Host) completeName(partial string) string {
names := h.NamesPrefix(partial)
if len(names) == 0 {
// Didn't find anything
return names[len(names)-1]
}
-func (h Host) completeCommand(partial string) string {
+func (h *Host) completeCommand(partial string) string {
for cmd, _ := range h.commands {
if strings.HasPrefix(cmd, partial) {
return cmd