github.com/signintech/pdft@v0.5.0/minigopdf/cache_content_line_type.go (about) 1 package gopdf 2 3 import ( 4 "bytes" 5 "fmt" 6 ) 7 8 type cacheContentLineType struct { 9 lineType string 10 } 11 12 func (c *cacheContentLineType) toStream(protection *PDFProtection) (*bytes.Buffer, error) { 13 var buff bytes.Buffer 14 switch c.lineType { 15 case "dashed": 16 buff.WriteString(fmt.Sprint("[5] 2 d\n")) 17 case "dotted": 18 buff.WriteString(fmt.Sprint("[2 3] 11 d\n")) 19 default: 20 buff.WriteString(fmt.Sprint("[] 0 d\n")) 21 } 22 return &buff, nil 23 }