Skip to content

Instantly share code, notes, and snippets.

@challiwill
Created March 17, 2016 00:02
Show Gist options
  • Save challiwill/916e02b00fdec097f7ae to your computer and use it in GitHub Desktop.
Save challiwill/916e02b00fdec097f7ae to your computer and use it in GitHub Desktop.
convert omegas to Expect's
for pattern in \
'Ω(a).Should(b) -> Expect(a).To(b)' \
'Ω(a).Should(b, c) -> Expect(a).To(b, c)' \
'Ω(a).ShouldNot(b) -> Expect(a).NotTo(b)' \
'Ω(a).ShouldNot(b, c) -> Expect(a).NotTo(b, c)' \
'Ω(a).To(b) -> Expect(a).To(b)' \
'Ω(a).ToNot(b) -> Expect(a).NotTo(b)' \
'Ω(a).NotTo(b) -> Expect(a).NotTo(b)' \
; do
find . -name '*.go' -a -not -path '*/Godeps/*' | xargs gofmt -w -r "${pattern}";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment