1. 19 Sep, 2016 1 commit
  2. 04 May, 2016 1 commit
  3. 29 Apr, 2016 1 commit
  4. 18 Jan, 2016 1 commit
  5. 17 Jan, 2016 1 commit
  6. 20 Jan, 2015 1 commit
  7. 09 Jan, 2015 1 commit
  8. 19 Nov, 2014 1 commit
  9. 05 Nov, 2014 4 commits
  10. 06 Oct, 2014 1 commit
    • Juan Batiz-Benet's avatar
      New Multiaddr interface · c90ef447
      Juan Batiz-Benet authored
      This commit changes the struct to a new Multiaddr interface:
      
      ```Go
      type Multiaddr interface {
        Equal(Multiaddr) bool
        Bytes() []byte
        String() string
        Protocols() []*Protocol
        Encapsulate(Multiaddr) Multiaddr
        Decapsulate(Multiaddr) Multiaddr
      }
      ```
      
      This means a few things have changed:
      
      - use Multiaddr interface, struct not exported
      - Bytes returns a copy of the internal bytes
      - Some methods no longer return errors (catch errors in NewMultiaddr)
        - String (panics if malformed)
        - Protocols (panics if malformed)
        - Decapsulate (no-op if not prefix)
      - Moved net-specific functions to package
        - Multiaddr.DialArgs() -> DialArgs(Multiaddr)
        - Multiaddr.IsThinWaist() -> IsThinWaist(Multiaddr)
      
      cc @whyrusleeping @perfmode
      c90ef447