package config import ( "bufio" "crypto/rand" "encoding/hex" "fmt" "os" "path/filepath" "strconv" "strings" ) type Config struct { Listen string DSN string SecretKey string UploadDir string DataDir string SessionDays int Debug bool // 底图。amap 走免密钥瓦片;填了 map_key 或选 tianditu 时改由服务端代理, // 密钥不出现在页面源码里。 MapProvider string // amap | tianditu | custom MapKey string MapTileURL string // custom 模式下的瓦片模板,支持 {s} {x} {y} {z} {key} MapCRS string // custom 模式下底图的坐标系:gcj02 | wgs84 // 地理编码(后台「按名称搜坐标」)。高德 Web 服务类型密钥,与瓦片用的 // JS 密钥不是同一个;只经服务端代理调用,不进入前端源码。留空则功能关闭。 GeocodeKey string // TrackScript 是第三方统计 / 追踪脚本。填 URL 会包成