package main

import "flag"

const (
	flagStaticPath = "static"   //静态文件参数
	flagMaxSize    = "maxsize"  //最大允许上传的文件大小
	flagAllowExt   = "allowext" //允许上传的文件格式
	flagDomain     = "domain"   // 文件服务域名

	defaultStaticPath = "./upload"
	defaultMaxSize    = 300 << 10         //默认300K
	defaultAllowExt   = ".jpeg|.jpg|.png" //注意.号
)

var (
	conStaticPath = flag.String(flagStaticPath, defaultStaticPath, "static file path")
	conMaxSize    = flag.Int(flagMaxSize, defaultMaxSize, "允许上传的最大文件尺寸")
	conAllowExt   = flag.String(flagAllowExt, defaultAllowExt, "允许上传的文件格式")
	conDomain     = flag.String(flagDomain, "", "文件服务器域名")
)
