Want to learn go language, need advice

i want to learn more about go.

  1. what IDE do you use to write and debug go code for rclone?
    for python i use pycharm from jetbrain. i noticed that they make a IDE for go.

thanks,

1 Like

Could be relevant for me too down the line. Some suggestions on what the best tools to get started with would be nice to have for then :slight_smile:

i am using Visual Studio Code with golang extensions

pretty happy with this, linux & windows

A lot of go users use vscode which has good support for go. Lots of Go users also just use their favourite text editor.

I use emacs, but that is a whole learning task on its own so I'd probably recommend something easier to start with. However if pycharm works with Go then why not give it a try.

If you are an experienced programmer then you can learn an awful lot of go just by doing the go tour.

Go is a deliberately simple language it has none of the complexities of C++ or Rust, it is more at the C level of complexity. It comes with great tooling though with testing, coverage, race detection, formatting built in.

If you ever learnt C/C#/Java then you'll feel reasonably at home with Go straight away.

(Aside: The type definitions are backwards from C which took me a bit of re-learning but I have to say they are a lot more logical - I no longer need to look up how to make an array of function pointers for example int (*p[4]) (int x, int y) (C) vs var p [4]func(x int, y int) (Go) which reads in Go "variable p is a 4 element array of function pointers which takes (x, y) parameters which are both integers".)

The concurrency in Go takes a while to master. The syntax is easy but writing concurrent programs is hard! The go race detector helps with this.

2 Likes

thanks to all,
i got vscode installed and running and i modified the launch.json.

Neat. Java and C++ were the two first languages I learned in school. If it's anything like Java then it's mostly just about bothering to read the manuals for the stuff you are working with :slight_smile:

Go has a similar syntax to Java, and like Java it is industrial strength, just without the boilerplate and ceremony! Also go isn't object oriented (no inheritance) it needs a mindset shift there.

need help to build rclone.exe on windows using vscode.
so far, i have downloaded vscode and did what needed to be done to debug rclone inside the ide.
and i created a custom launch.json.

now i need to build the rlcone.exe itself with the ability to mount.
as i understand it from @ncw, there are a few additional steps.
" You'll need mingw installed and WinFSP and build Rclone with the flag -tags cmount"`

as he is super busy, perhaps someone can help me.
i have installed mingw and winfsp but i am stuck as to what to do with that flag.

so with vscode,

  1. what do i need to build the .exe?
  2. what to do with that flag '-tags cmount?
  3. what to do with win-build.bat?

thanks much,

There are some notes here: https://github.com/rclone/rclone/wiki/Setting-up-a-Windows-development-environment-for-rclone

That shows how to set PATH and CPATH and what to do with the -tags flag :slight_smile:

thanks but that wiki is not helpful to me.

hopefully someone using vscode can help me configure it so i can build rclone.exe

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.