mirror of
https://github.com/openfaas/faas.git
synced 2025-06-18 03:56:37 +00:00
should use strings.Contains() instead of stings.Index()
Signed-off-by: wgliang <liangcszzu@163.com>
This commit is contained in:
@ -42,7 +42,7 @@ func MakeFunctionReader(metricsOptions metrics.MetricOptions, c *client.Client)
|
||||
var envProcess string
|
||||
|
||||
for _, env := range service.Spec.TaskTemplate.ContainerSpec.Env {
|
||||
if strings.Index(env, "fprocess=") > -1 {
|
||||
if strings.Contains(env, "fprocess=") {
|
||||
envProcess = env[len("fprocess="):]
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user