This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-cli.git


The following commit(s) were added to refs/heads/master by this push:
     new e3f41f9  recognize .rs extention as a Rust action kind (#495)
e3f41f9 is described below

commit e3f41f9c0a9617774f473b12d1c379557a928bb4
Author: David Grove <[email protected]>
AuthorDate: Tue Feb 16 22:59:55 2021 -0500

    recognize .rs extention as a Rust action kind (#495)
---
 commands/action.go | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/commands/action.go b/commands/action.go
index 6c2b11a..7d4f5fd 100644
--- a/commands/action.go
+++ b/commands/action.go
@@ -56,6 +56,7 @@ const (
        PHP_EXT           = ".php"
        BAL_BIN_EXT       = ".balx"
        RUBY_EXT          = ".rb"
+       RUST_EXT          = ".rs"
        GO_EXT            = ".go"
        NODE_JS           = "nodejs"
        PYTHON            = "python"
@@ -63,6 +64,7 @@ const (
        SWIFT             = "swift"
        PHP               = "php"
        RUBY              = "ruby"
+       RUST              = "rust"
        GO                = "go"
        BAL               = "ballerina"
        DEFAULT           = "default"
@@ -644,6 +646,8 @@ func getExec(args []string, params ActionFlags) 
(*whisk.Exec, error) {
                exec.Kind = fmt.Sprintf("%s:%s", PHP, DEFAULT)
        } else if ext == RUBY_EXT {
                exec.Kind = fmt.Sprintf("%s:%s", RUBY, DEFAULT)
+       } else if ext == RUST_EXT {
+               exec.Kind = fmt.Sprintf("%s:%s", RUST, DEFAULT)
        } else if ext == GO_EXT {
                exec.Kind = fmt.Sprintf("%s:%s", GO, DEFAULT)
        } else if ext == BAL_BIN_EXT {
@@ -693,6 +697,8 @@ func getKindExtension(runtime string) (extension string) {
                extension = fmt.Sprintf(".%s", runtime)
        case RUBY:
                extension = RUBY_EXT
+       case RUST:
+               extension = RUST_EXT
        case GO:
                extension = GO_EXT
        }

Reply via email to