mrutkows opened a new issue #692: Create common util for matching source code extensions to runtimes URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/692 for example, in filesystemreader.go we have repeated logic around finding the correct runtime for a few hardcoded extensions. This is not extensible and this will be needed in other parts of the tool's code. here is one snippet from filesystem reader that is repeated at least 2 times: ``` if ext == ".swift" || ext == ".js" || ext == ".py" { kind := "nodejs:default" switch ext { case ".swift": kind = "swift:default" case ".js": kind = "nodejs:default" case ".py": kind = "python" } ``` This logic should be common/centralized and made to be dynamic/robust. We should have a common set of utils (in utils package) that performs these types of functions (i.e., mapping files exts. to runtimes) and furthermore attempts to do this dynamically via API host (API) when possible. NOTE: other utils should be able to enumerate all known runtimes (and their extensions) for user display purposes as well, perhaps we could have tuples/structs that organize the data for query.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
