From 64e576d993d0e242ab47cedb0240838fc4ec37d1 Mon Sep 17 00:00:00 2001 From: Sebastian Winkler Date: Mon, 25 Mar 2019 13:40:14 +0100 Subject: [PATCH] localisation: adds Contains func --- .gitlab-ci.yml | 1 + localisation/funcs.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 119bfbd..63108ed 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,4 +7,5 @@ stages: - prepare Go Lint: + stage: prepare extends: .Go Service - Go Lint diff --git a/localisation/funcs.go b/localisation/funcs.go index 2dcc2c3..096e6f4 100644 --- a/localisation/funcs.go +++ b/localisation/funcs.go @@ -122,5 +122,9 @@ var ( return shortened }, + + "Contains": func(s, substr string) bool { + return strings.Contains(s, substr) + }, } )