github.com/artisanhe/tools@v1.0.1-0.20210607022958-19a8fef2eb04/courier/httpx/html.go (about)

     1  package httpx
     2  
     3  import (
     4  	"bytes"
     5  )
     6  
     7  func NewHTML(data []byte) *HTML {
     8  	html := &HTML{}
     9  	html.Write(data)
    10  	return html
    11  }
    12  
    13  // swagger:strfmt html
    14  type HTML struct {
    15  	bytes.Buffer
    16  }
    17  
    18  func (h HTML) ContentType() string {
    19  	return MIMEHTML
    20  }