consul/agent/cache
R.B. Boyer b60d89e7ef bulk rewrite using this script
set -euo pipefail

    unset CDPATH

    cd "$(dirname "$0")"

    for f in $(git grep '\brequire := require\.New(' | cut -d':' -f1 | sort -u); do
        echo "=== require: $f ==="
        sed -i '/require := require.New(t)/d' $f
        # require.XXX(blah) but not require.XXX(tblah) or require.XXX(rblah)
        sed -i 's/\brequire\.\([a-zA-Z0-9_]*\)(\([^tr]\)/require.\1(t,\2/g' $f
        # require.XXX(tblah) but not require.XXX(t, blah)
        sed -i 's/\brequire\.\([a-zA-Z0-9_]*\)(\(t[^,]\)/require.\1(t,\2/g' $f
        # require.XXX(rblah) but not require.XXX(r, blah)
        sed -i 's/\brequire\.\([a-zA-Z0-9_]*\)(\(r[^,]\)/require.\1(t,\2/g' $f
        gofmt -s -w $f
    done

    for f in $(git grep '\bassert := assert\.New(' | cut -d':' -f1 | sort -u); do
        echo "=== assert: $f ==="
        sed -i '/assert := assert.New(t)/d' $f
        # assert.XXX(blah) but not assert.XXX(tblah) or assert.XXX(rblah)
        sed -i 's/\bassert\.\([a-zA-Z0-9_]*\)(\([^tr]\)/assert.\1(t,\2/g' $f
        # assert.XXX(tblah) but not assert.XXX(t, blah)
        sed -i 's/\bassert\.\([a-zA-Z0-9_]*\)(\(t[^,]\)/assert.\1(t,\2/g' $f
        # assert.XXX(rblah) but not assert.XXX(r, blah)
        sed -i 's/\bassert\.\([a-zA-Z0-9_]*\)(\(r[^,]\)/assert.\1(t,\2/g' $f
        gofmt -s -w $f
    done
2022-01-20 10:46:23 -06:00
..
cache.go cache: Fix bug where connection errors can cause early cache expiry (#9979) 2021-04-08 11:11:15 +01:00
cache_test.go bulk rewrite using this script 2022-01-20 10:46:23 -06:00
entry.go lib/ttlcache: extract package from agent/cache 2020-10-20 19:10:20 -04:00
mock_Request.go agent/cache: Make all cache options RegisterOptions 2020-04-16 18:56:34 -04:00
mock_Type.go agent/cache: Make all cache options RegisterOptions 2020-04-16 18:56:34 -04:00
request.go Support Agent Caching for Service Discovery Results (#4541) 2018-10-10 16:55:34 +01:00
testing.go Decrease test flakiness 2020-08-24 20:30:02 +01:00
type.go agent/cache: Use AllowNotModifiedResponse in CatalogListServices 2020-07-14 18:58:20 -04:00
watch.go cache: log a warning when Cache.Notify handles an error 2021-02-12 13:02:23 -05:00
watch_test.go bulk rewrite using this script 2022-01-20 10:46:23 -06:00