hunk.code_window: 				result.Err = model.NewAppError("SqlUserStore.Save", "store.sql_user.save.email_exists.app_error", nil, "user_id="+user.Id+", "+err.Error(), http.StatusBadRequest)
   			} else if IsUniqueConstraintError(err.Error(), []string{"Username", "users_username_key", "idx_users_username_unique"}) {
   				result.Err = model.NewAppError("SqlUserStore.Save", "store.sql_user.save.username_exists.app_error", nil, "user_id="+user.Id+", "+err.Error(), http.StatusBadRequest)
   			} else {
   				result.Err = model.NewLocAppError("SqlUserStore.Save", "store.sql_user.save.app_error", nil, "user_id="+user.Id+", "+err.Error())
  
hunk.labels: keep replace keep keep keep
hunk.after_edit: 			} else if IsUniqueConstraintError(err, []string{"Username", "users_username_key", "idx_users_username_unique"}) {
  
hunk.file_path: store/sql_user_store.go
hunk.type: replace
file: package cmd
  
  import (
  	"testing"
  )
  
  func TestFindExistingPackage(t *testing.T) {
  	path := findPackage("github.com/spf13/cobra")
  	if path == "" {
  		t.Fatal("findPackage didn't find the existing package")
  	}
  	if !hasGoPathPrefix(path) {
  		t.Fatalf("%q is not in GOPATH, but must be", path)
  	}
  }
  
  func hasGoPathPrefix(path string) bool {
  	for _, srcPath := range srcPaths {
  		if filepathHasPrefix(path, srcPath) {
  			return true
  		}
  	}
  	return false
  }
  