• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

snowplow / sql-runner / 15063404311

16 May 2025 07:46AM UTC coverage: 27.73% (+1.0%) from 26.721%
15063404311

push

github

jbeemster
Prepared for release

353 of 1273 relevant lines covered (27.73%)

2.04 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/sql_runner/template.go
1
// Copyright (c) 2015-2025 Snowplow Analytics Ltd. All rights reserved.
2
//
3
// This program is licensed to you under the Apache License Version 2.0,
4
// and you may not use this file except in compliance with the Apache License Version 2.0.
5
// You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0.
6
//
7
// Unless required by applicable law or agreed to in writing,
8
// software distributed under the Apache License Version 2.0 is distributed on an
9
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
// See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
11
package main
12

13
import (
14
        "math/rand"
15
        "os"
16
        "strconv"
17
        "text/template"
18
        "time"
19
)
20

21
var (
22
        // TemplFuncs is the supported template functions map.
23
        TemplFuncs = template.FuncMap{
24
                "nowWithFormat": func(format string) string {
×
25
                        return time.Now().Format(format)
×
26
                },
×
27
                "systemEnv": func(env string) string {
×
28
                        return os.Getenv(env)
×
29
                },
×
30
                "randomInt": func() (string, error) {
×
31
                        r := rand.NewSource(time.Now().UnixNano())
×
32
                        return strconv.FormatInt(r.Int63(), 10), nil
×
33
                },
×
34
                "awsChainCredentials":   awsChainCredentials,
35
                "awsEC2RoleCredentials": awsEC2RoleCredentials,
36
                "awsEnvCredentials":     awsEnvCredentials,
37
                "awsProfileCredentials": awsProfileCredentials,
38
        }
39
)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc