code: func SplitLast(m Multiaddr) (Multiaddr, *Component) {
  	// Shortcut if we already have a component
  	if c, ok := m.(*Component); ok {
  		return nil, c
  	}
  
  	b := m.Bytes()
  	if len(b) == 0 {
  		return nil, nil
  	}
  
  	var (
  		c      Component
  		err    error
  		offset int
  	)
  	for {
  		var n int
  		n, c, err = readComponent(b[offset:])
  		if err != nil {
  			panic(err)
  		}
  		if len(b) == n+offset {
  			// Reached end
  			if offset == 0 {
  				// Only one component
  				return nil, &c
  			}
  			return &multiaddr{b[:offset]}, &c
  		}
  		offset += n
  	}
  }
docs: // SplitLast returns the rest of the multiaddr and the last component.