• 此项目
    • 正在载入...
  • 登录

allied-creation / sumifcc-bchart · 文件

转到一个项目

GitLab

  • 转到群组
  • 项目
  • 活动
  • 文件
  • 提交
  • 管道 0
  • 构建 0
  • 图表
  • 里程碑
  • 问题 0
  • 合并请求 0
  • 成员
  • 标记
  • 维基
  • 派生
  • 网络
  • 创建新的问题
  • sumifcc-bchart
  • cmd
  • chart-server
  • interanl
  • pkg
  • gateway
  • request_option.go
  • init
    9e7b6023
    yangfu 在
    2023-09-13 15:04:07 +0800
    提交 浏览文件
request_option.go 387 字节
原文件 审查 历史 永久链接
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
package gateway

import "net/http"

type RequestOptions struct {
	Header http.Header
	// key:form key value:path
	FileMap map[string]string
}

type Option func(o *RequestOptions)

func WithHeader(header http.Header) Option {
	return func(o *RequestOptions) {
		o.Header = header
	}
}

func WithFileMap(v map[string]string) Option {
	return func(o *RequestOptions) {
		o.FileMap = v
	}
}