Export to GitHub

weed-fs - issue #43

Source is not formatted in accordance with go fmt


Posted on Sep 1, 2013 by Swift Elephant

What steps will reproduce the problem? 1. Enter project directory 2. Run go fmt

What is the expected output? What do you see instead? Expect no formatting errors. See that go fmt has found/fixed several errors.

What version of the product are you using? On what operating system? master branch

Please provide any additional information below.

I've attached a patch with the go fmt fixes.

Attachments

Comment #1

Posted on Sep 2, 2013 by Grumpy Cat

Thanks. I applied the changes.

Also, I would like to know how to "go fmt" for all the files. Right now I use eclipse, but need to "ctrl+S" in order to invoke "go fmt" for one particular file. I would like some tool to automatically "go fmt" for all the files before checking in.

Comment #2

Posted on Sep 2, 2013 by Swift Elephant

If you enter the directory where your source files are, you can run "go fmt" and it will format the files and print a list of the ones that were changed. You have to do this in each directory since it doesn't run recursively.

Status: Fixed

Labels:
Type-Defect Priority-Medium