Mirror of github.com/gissleh/irc
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
414 B

  1. package list
  2. // An Immutable is a wrapper around a userlist reference that provides a limited
  3. // set of methods for reading a userlist's content
  4. type Immutable struct {
  5. list *List
  6. }
  7. // User gets a user by nick
  8. func (il Immutable) User(nick string) (u User, ok bool) {
  9. return il.list.User(nick)
  10. }
  11. // Users gets all the users in the list, in order
  12. func (il Immutable) Users() []User {
  13. return il.list.Users()
  14. }