func (s *Snapshot) GetUsers(ctx context.Context) error {
	users, err := host.UsersWithContext(ctx)
	if err != nil {
		return fmt.Errorf("getting userlist: %w", err)
	}
	s.System.Users = len(users)
	return nil
}
GetUsers collects logged in users.
package snapshot
import (
	"context"
	"fmt"
	"github.com/shirou/gopsutil/v3/host"
)