GithubHelp home page GithubHelp logo

Comments (6)

BudgieInWA avatar BudgieInWA commented on July 4, 2024

+1 Features like this make IDEs essential.

from liteide.

matrixik avatar matrixik commented on July 4, 2024

https://github.com/bradfitz/goimports

This tool updates your Go imports, adding missing ones and removing
unreferenced onces.

It's a fork of gofmt, and will also fmt your code, so it can be used
as a replacement for your gofmt-on-save hook in your editor.

On golang-nuts: https://groups.google.com/d/msg/golang-nuts/ahPVZ9htw7s/Nhvi50jjGd4J

It's gofmt + it fixes your includes, adding missing ones and removing unreferenced ones.

You can make it your editor's on-save hook, and then not worry about imports.

Best regards,
Dobrosław Żybort

from liteide.

mzimmerman avatar mzimmerman commented on July 4, 2024

+1 Looking through the code I see that gofmt is hardcoded into liteide/liteidex/src/plugins/golangfmt/golangfmt.cpp
It would be nice to have an option to configure what that binary should be (and it's arguments) but I was able to replace my system wide gofmt with goimports and it's working just fine so far. It'll be replaced again with my next go install by my package manager and the cycle will repeat.

from liteide.

visualfc avatar visualfc commented on July 4, 2024

accept

from liteide.

visualfc avatar visualfc commented on July 4, 2024

fixed

from liteide.

mzimmerman avatar mzimmerman commented on July 4, 2024

Nice, thanks. For all those interested, this was fixed in 60fa541

from liteide.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.