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: account.go
    path of file: ./repos/studygolang/internal/http/controller
    
    the code of the file until where you have to start completion: // Copyright 2013 The StudyGolang Authors. All rights reserved.
// Use of self source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// http://studygolang.com
// Author: polaris	polaris@studygolang.com

package controller

import (
	"html/template"
	"net/http"
    
func (AccountController) ChangePwd(ctx echo.Context) error {
	curUser := ctx.Get("user").(*model.Me)

	curPasswd := ctx.FormValue("cur_passwd")
	newPasswd := ctx.FormValue("passwd")
	errMsg, err := logic.DefaultUser.UpdatePasswd(context.EchoContext(ctx), curUser.Username, curPasswd, newPasswd)
	if err != nil {
		return fail(ctx, 1, errMsg)
	}
	return success(ctx, nil)
}