code: func (a *Auth) canonicalizedHeaders(req *http.Request) string {
  	var buffer bytes.Buffer
  
  	for key, value := range req.Header {
  		lowerKey := strings.ToLower(key)
  
  		if strings.HasPrefix(lowerKey, "x-ms-") {
  			if buffer.Len() == 0 {
  				buffer.WriteString(fmt.Sprintf("%s:%s", lowerKey, value[0]))
  			} else {
  				buffer.WriteString(fmt.Sprintf("\n%s:%s", lowerKey, value[0]))
  			}
  		}
  	}
  
  	split := strings.Split(buffer.String(), "\n")
  	sort.Strings(split)
  
  	return strings.Join(split, "\n")
  }
docs: //
  // The following is copied ~95% verbatim from:
  //  http://github.com/loldesign/azure/ -> core/core.go
  //
  /*
  Based on Azure docs:
    Link: http://msdn.microsoft.com/en-us/library/windowsazure/dd179428.aspx#Constructing_Element
  
    1) Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header.
    2) Convert each HTTP header name to lowercase.
    3) Sort the headers lexicographically by header name, in ascending order. Note that each header may appear only once in the string.
    4) Unfold the string by replacing any breaking white space with a single space.
    5) Trim any white space around the colon in the header.
    6) Finally, append a new line character to each canonicalized header in the resulting list. Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string.
  */