fix.bash 535 B

12345678910111213141516171819
  1. #!/usr/bin/env bash
  2. #
  3. # Applies transformations to source trees to keep up to date with
  4. # with the external API.
  5. #
  6. if [ -z "$@" ]; then
  7. echo "Usage: $0 path/to/package"
  8. exit 1
  9. fi
  10. gofmt \
  11. -r 'NewStatsd(a) -> Dial("udp",a)' \
  12. -r 'UpdateGague(a,b) -> Gauge(1.0,a,b)' \
  13. -r 'UpdateSampledGaguge(a,b,c) -> Gauge(c,a,b)' \
  14. -r 'SendTiming(a,b) -> Timing(1.0,a,b)' \
  15. -r 'SendSampledTiming(a,b,c) -> Timing(c,a,b)' \
  16. -r 'IncrementCounter(a,b) -> Count(1.0,a,b)' \
  17. -r 'IncrementSampledCounter(a,b,c) -> Count(c,a,b)' \
  18. -w $@