code: func (a Address) String() string {
  	switch len(a) {
  	case 4:
  		return fmt.Sprintf("%d.%d.%d.%d", int(a[0]), int(a[1]), int(a[2]), int(a[3]))
  	case 16:
  		// Find the longest subsequence of hexadecimal zeros.
  		start, end := -1, -1
  		for i := 0; i < len(a); i += 2 {
  			j := i
  			for j < len(a) && a[j] == 0 && a[j+1] == 0 {
  				j += 2
  			}
  			if j > i+2 && j-i > end-start {
  				start, end = i, j
  			}
  		}
  
  		var b strings.Builder
  		for i := 0; i < len(a); i += 2 {
  			if i == start {
  				b.WriteString("::")
  				i = end
  				if end >= len(a) {
  					break
  				}
  			} else if i > 0 {
  				b.WriteByte(':')
  			}
  			v := uint16(a[i+0])<<8 | uint16(a[i+1])
  			if v == 0 {
  				b.WriteByte('0')
  			} else {
  				const digits = "0123456789abcdef"
  				for i := uint(3); i < 4; i-- {
  					if v := v >> (i * 4); v != 0 {
  						b.WriteByte(digits[v&0xf])
  					}
  				}
  			}
  		}
  		return b.String()
  	default:
  		return fmt.Sprintf("%x", []byte(a))
  	}
  }
docs: // String implements the fmt.Stringer interface.