You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: category.go
    path of file: ./repos/wemall/controller/category
    
    the code of the file until where you have to start completion: package category

import (
	"unicode/utf8"
	"strings"
	"strconv"
	"gopkg.in/kataras/iris.v6"
	"wemall/config"
	"wemall/model"
	"wemall/controller/common"
)

// Save 保存分类（创建或更新）
func Save(ctx *iris.Context, isEdit bool) {
	SendErrJSON := common.SendErrJSON
	// name, parentId, status, order 必须传的参数
	// remark 非必须
	minOrder := config.ServerConfig.M
    
func List(ctx *iris.Context) {
	SendErrJSON := common.SendErrJSON
	var categories []model.Category

	if model.DB.Where("status = 1").Order("sequence asc").Find(&categories).Error != nil {
		SendErrJSON("error", ctx)
		return
	}

	ctx.JSON(iris.StatusOK, iris.Map{
		"errNo" : model.ErrorCode.SUCCESS,
		"msg"   : "success",
		"data"  : iris.Map{
			"categories": categories,
		},
	})
}