diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..3eb4531 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,31 @@ +name: "CodeQL" + +on: + push: + branches: [master, develop] + pull_request: + branches: [master] + schedule: + - cron: '0 16 * * 1,3,5' + +jobs: + analyse: + name: Analyse + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 2 + + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: go + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.travis.yml b/.travis.yml index 7bde6fa..f9acc92 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ language: go go: - - 1.13.x - 1.14.x + - 1.15.x - tip branches: diff --git a/librato.go b/librato.go index 061f0d4..3f01e8a 100644 --- a/librato.go +++ b/librato.go @@ -22,7 +22,7 @@ import ( // ////////////////////////////////////////////////////////////////////////////////// // // VERSION contains current version of librato package and used as part of User-Agent -const VERSION = "10.0.0" +const VERSION = "10.0.1" // ////////////////////////////////////////////////////////////////////////////////// // @@ -520,7 +520,7 @@ func sendingLoop() { now := time.Now().Unix() for _, source := range sources { - period := timeutil.DurationToSeconds(source.getPeriod()) + period := int64(timeutil.DurationToSeconds(source.getPeriod())) lastSendTime := source.getLastSendingDate() if period == 0 || lastSendTime <= 0 {