title: Interface naming convention Golang
body: <p>I'll just post my code:</p>
  
  <pre><code>/*
  *  Role will ALWAYS reserve the session key "role".
   */
  package goserver
  
  const (
      ROLE_KEY string = "role"
  )
  
  type Role string
  
  //if index is higher or equal than role, will pass
  type RolesHierarchy []Role
  
  func (r Role) String() string {
      return string(r)
  }
  
  func NewRole(session ServerSession) Role {
      return session.GetValue(ROLE_KEY).(Role)
  }
  
  func (this Role) IsRole(role Role, hierarchy RolesHierarchy) bool {
      if role == this {
          return true
      }
      if len(hierarchy) == 0 {
          return false
      }
      var thisI int = 0
      var roleI int = 0
      //Duped roles in hierarchy are verified in verifyConfig during parse
      for i, r := range hierarchy {
          if this == r {
              thisI = i
          }
          if role == r {
              roleI = i
          }
      }
      //TODO I can probably condense what follows into one if
      if thisI == 0 &amp;&amp; roleI == 0 {
          return false
      }
      return thisI &gt;= roleI
  }
  
  func (this *Role) AssumeRole(session ServerSession, role Role) {
      session.SetValue(ROLE_KEY, role)
      *this = role
  }
  </code></pre>
  
  <p>It should be noted that ServerSession is also an interface, calling "ServerSessioner" just feels wonky to me.</p>
  
  <p>I'm toying with the idea of creating an interface with IsRole() and AssumeRole(), however "Roler" seems very wonky.  It's dawning on me that I don't really know or have ever come across naming conventions for interfaces, other than the standard "er" suffix.  I do seem to recall the VS C++ convention is to just throw an "I" in front of everything.  Is this "idiomatic"?</p>
  
  <p>Any suggestions?</p>