From e5fe0ea0b35424449d4aeebc23d400f58a7b04da Mon Sep 17 00:00:00 2001 From: Russ Magee Date: Wed, 27 Jun 2018 15:18:28 -0700 Subject: [PATCH] Added godocs --- goutmp.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/goutmp.go b/goutmp.go index dd8303a..bf325f5 100644 --- a/goutmp.go +++ b/goutmp.go @@ -84,10 +84,12 @@ import ( "time" ) +// UtmpEntry wraps the C struct utmpx type UtmpEntry struct { entry C.struct_utmpx } +// Put a username and the originating host/IP to utmp func Put_utmp(user string, host string) (UtmpEntry) { var entry UtmpEntry @@ -95,10 +97,12 @@ func Put_utmp(user string, host string) (UtmpEntry) { return entry } +// Remove a username/host entry from utmp func Unput_utmp(entry UtmpEntry) { C.unpututmp(&entry.entry) } +// Put the login app, username and originating host/IP to lastlog func Put_lastlog_entry(app string, usr string, host string) { u, e := user.Lookup(usr) if e != nil {