package controller import ( "github.com/gin-gonic/gin" "service/library/apollo" "service/library/logger" ) func ColdConfigHandler(ctx *gin.Context) { shareRedirectUrl, err := apollo.GetStringValue("share_redirect_url", apollo.ApolloOpts().SetNamespace("application")) if err != nil { logger.Error("apollo.GetStringValue fail, key: %v, err: %v", "share_redirect_url", err) } shareRedirectUrls := make([]string, 0) err = apollo.GetJson("share_redirect_urls", &shareRedirectUrls, apollo.ApolloOpts().SetNamespace("application")) if err != nil { logger.Error("apollo.GetJson fail, key: %v, err: %v", "share_redirect_url", err) } data := map[string]any{ "share_redirect_url": shareRedirectUrl, "share_redirect_urls": shareRedirectUrls, } ReplyOk(ctx, data) }