2

I'm trying to do a gofmt rewrite of all packages that start with a certain prefix. Something like:

gofmt -r 'github.com/some/path/<wildcard> -> someotherrepo.com/some/path/<wildcard>'

Obviously wildcard isn't valid syntax, just showing the concept. I've tried with a single lowercase character, but that doesn't work here.

Is it possible to do what I'm trying with gofmt?

Jeff Storey
  • 56,312
  • 72
  • 233
  • 406

1 Answers1

-2

This is what the gofmt command page says

Given a file, it operates on that file; given a directory, it operates on all .go files
in that directory, recursively

https://golang.org/cmd/gofmt/

HaseebR7
  • 447
  • 4
  • 11
  • That doesn't help at all, because the path is a syntactic construct to rewrite, not a file path to operate on. – Jon Watte Feb 10 '22 at 19:17