You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
311 B
14 lines
311 B
package http |
|
|
|
import ( |
|
"fmt" |
|
|
|
bm "go-common/library/net/http/blademaster" |
|
) |
|
|
|
func outBuf(c *bm.Context, buf []byte, name string) { |
|
c.Writer.Header().Set("Content-Type", "application/csv") |
|
c.Writer.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=%s.csv", name)) |
|
c.Writer.Write(buf) |
|
|
|
}
|
|
|