mirror of
https://github.com/openfaas/faas.git
synced 2025-06-08 16:26:47 +00:00
Use a placeholder commit message for development
The faas-cli throws an error because it always expects a commit_message for the gateway version, and if it's null - it will crash. This only affects local development. The code in faas-cli should be changed to use a struct instead of casting to an interface. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
parent
87d563664a
commit
2e2250afe8
@ -17,6 +17,7 @@ import (
|
||||
"github.com/openfaas/faas/gateway/plugin"
|
||||
"github.com/openfaas/faas/gateway/scaling"
|
||||
"github.com/openfaas/faas/gateway/types"
|
||||
"github.com/openfaas/faas/gateway/version"
|
||||
natsHandler "github.com/openfaas/nats-queue-worker/handler"
|
||||
)
|
||||
|
||||
@ -24,6 +25,11 @@ import (
|
||||
const NameExpression = "-a-zA-Z_0-9."
|
||||
|
||||
func main() {
|
||||
if len(version.GitCommitMessage) == 0 {
|
||||
version.GitCommitMessage = "Place-holder for commit message"
|
||||
}
|
||||
|
||||
// log.Printf("Commit: %s", version.GitCommitMessage)
|
||||
|
||||
osEnv := types.OsEnv{}
|
||||
readConfig := types.ReadConfig{}
|
||||
|
Loading…
x
Reference in New Issue
Block a user