diff --git a/project/project.go b/project/project.go
index <HASH>..<HASH> 100644
--- a/project/project.go
+++ b/project/project.go
@@ -74,11 +74,7 @@ func (p *Project) Deploy(names []string) error {
 
 			go func() {
 				defer sem.Release()
-				if fn, err := p.FunctionByName(name); err != nil {
-					errs <- err
-				} else {
-					errs <- fn.Deploy()
-				}
+				errs <- p.deploy(name)
 			}()
 		}
 
@@ -99,6 +95,15 @@ func (p *Project) Deploy(names []string) error {
 	return nil
 }
 
+// deploy function by `name`.
+func (p *Project) deploy(name string) error {
+	if fn, err := p.FunctionByName(name); err != nil {
+		return err
+	} else {
+		return fn.Deploy()
+	}
+}
+
 // Clean up function build artifacts.
 func (p *Project) Clean(names []string) error {
 	p.Log.Debugf("cleaning %d functions", len(names))
refactor Project.Deploy() with Project.deploy() util