Ejemplo n.º 1
0
// GetPlaceHolders return the placeholders that are present in the appname config file
func GetPlaceHolders(c *gin.Context) {
	name := c.Param("appname")
	myViper, err := readTemplate(name)
	if err != nil {
		c.String(http.StatusNotFound, "Config file for %s not found\n", name)
	} else {
		properties := placeholders.GetPlaceHolders(myViper)
		c.IndentedJSON(http.StatusOK, properties)
	}
}