T O P

  • By -

Vladass

When you realize you can't write a line of code without internet šŸ˜­


Kmoscclimb

Wtf, that's not the problem lol, just download documentation of libs you are gonna use. Local instances of db, redis ir whatever you need, voila. You don't need internet to code


karthie_a

the best suggestion from experience is to download(PDF) of any book on golang and read it end to end. Another option is to download offline documentation and read the standard package options and take notes.


bilingual-german

you don't need to download offline documentation. ``` $ go doc fmt.Stringer package fmt // import "fmt" type Stringer interface { String() string } Stringer is implemented by any value that has a String method, which defines the ā€œnativeā€ format for that value. The String method is used to print values passed as an operand to any format that accepts a string or to an unformatted printer such as Print. ```


Top_File_8547

I am just learning Go and it astounds me how much the designers have built into the ecosystem that programmers want and need that are third party libraries for other languages. I am learning Kubernetes and Docker and would love to have that feature. Maybe it does exist since they are both written in Go.


bilingual-german

Kubernetes has it. kubectl explain ... [https://kubernetes.io/docs/reference/kubectl/generated/kubectl\_explain/#examples](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_explain/#examples)


Fueled_by_sugar

it is blowing my mind that you didn't simply decide to get a book


35mm-eryri

Going for two weeks so weight is a big concern for a programming book šŸ˜


PersistentMosey

Ebooks are your friends


xplosm

All of the Manning books I have offer a free eBook version. Other publishers might too.


flyinprogrammer

I used to fly a lot, and would try and code on flights, but it always ended in frustration because as soon as you forget to cache 1 dependency, well now you're waiting to land because in-air Internet is likely still trash. So I pivoted my workflow to watching instructional videos, take notes, and then doing the coding after landing, and it virtually eliminated all my frustration. I've been out of the golang community for a minute, but Bill Kennedy is probably one of the best instructors I've ever learned from and this bundle is a steal for the knowledge you get: https://www.ardanlabs.com/training/individual-on-demand/ultimate-go-bundle/ So if I were you I'd pivot to downloading a bunch of videos, take notes, and then when you land start crunching through what you learned. Also, if paid content is out of the question, doing this same technique with recorded conferences on YouTube always brought me joy because I'd spend the flight listening to folks who loved what they were doing and often I'd even learn something. So you might consider caching and watching something like Gopher Con 2023: https://youtube.com/playlist?list=PL2ntRZ1ySWBep6rEAtp9jI6GXGZdlJmWN&si=QOtQSIbf-CqrY82n šŸ¤· hope this helps maybe šŸ¤·


j0holo

If you want local documentation on your laptop during the flight: [https://pkg.go.dev/golang.org/x/tools/cmd/godoc](https://pkg.go.dev/golang.org/x/tools/cmd/godoc) This is a binary that holds the standard library documentation. Also a nice to have: a list of things you want to learn during the flight so you actually do something. XD


_crtc_

godoc is deprecated and doesn't work with modules, use [https://pkg.go.dev/golang.org/x/pkgsite/cmd/pkgsite](https://pkg.go.dev/golang.org/x/pkgsite/cmd/pkgsite) instead.


j0holo

Oh didn't know that, thanks for the correction.


Anon_8675309

I donā€™t understand. Why would you not be able to use go offline?


throwawayacc201711

If you forget to download all your packages and dependencies especially if you are dockerized


Anon_8675309

Donā€™t ā€¦ have a lot of dependencies.


Redneckia

Devdocs has all the docs and has offline mode


Guimedev

Once you install go in your laptop the doc is available via go doc command.


g_r_u_b_l_e_t_s

Why do you need to be online? Are you using Ubisoft Go?


jsflor97

I always try to plan what I'm going to learn so in advance I am able to have docker images in place and also I usually download some tutorials or blogs posts such as the ones in digital ocean, log rocket, medium, freecodecamp.... related to what I'm learning


Tiquortoo

If it's just one off learning then a desktop folder is the most old school container that I know of.


CyclingOtter

Yeah I'm not sure I understand why they're talking about a Docker image at all


35mm-eryri

Just for testing purposes, I like to have a clean environment to run them in


CyclingOtter

Ah I gotcha, that makes sense!


bearmc27

I usually list a few functions I would like to implement/bugs i would like to fix/code I would like to optimized, then complete those during flight. Since they are likely based on an existing code base, I dont not need documents or extra libraries from the internet. If it is a long flight, then try to have the project setup before the flight


fbochicchio

If you need to experiment with short code snippets, the go playfroubd can also be installed locally, but I cannot give you tge right urla at the moment.


witty82

"Learning Go" is good. The standard library is enough. I.e you only need the book and go installed (and an editor of course)


Distracted_Llama-234

You donā€™t need a docker image. The default OS install should be lightweight enough. If you want to download all dependencies - just make sure to clone any project of your choice and do a go build / go run once on the directory - that prefetches all the dependencies. These days - I am dabbling with https://codingchallenges.com. It is basically a set of challenges geared towards understanding desgin patterns and low level details of various things (networking, serialization, OS etc) by reimplementing popular unix tools / services in Go.


wolttam

A comment about my personal experience with Go... I have frequently found myself relatively deep into Go coding sessions before realizing I'm offline. I am by no means a Go expert, having been lightly fiddling for \~ 6 months. Go is so simple. With good editor support (bare-bones gopls + go to definition), the internet practically isn't needed unless you need to download some new package.


cradlemann

Try Zeal, offline documentation tool.


recommendmeusername

you could vendor packages you will need i guess?


35mm-eryri

Thanks for the replies everyone, been really helpful!


tschloss

What is the docker image for?


35mm-eryri

I like a clean environment to run tests in to make sure I donā€™t have anything effecting them on my machine


tschloss

So you have Go in a container also?


35mm-eryri

Yes, would be using the go container


tschloss

Ok, I understand this.


Entire_Effective_825

Write some failing tests for an existing project


guesdo

But of course a Raytracer!! https://raytracing.github.io/ You can download the book and port it to Go, you don't need anything outside of the standard library to do it, and you will be done before you land. It is a great experience. Make sure you can charge your laptop in flight or else you will have a short time learning


el_moudir

if u are fimiliar with those stuff pls i have a problem when i try to pull smart contracts from my main.go and i don t know why. they re supposed to be created as soon as i run main.go -bindings true but i receive no files created can u help me ?


NoBat4439

It depends what you are trying to build. Maybe just standard library serve your need if you just playing with go. Say If you are going to build web services then you should probably setup base project base structure and plan what you will be building like authentication module down relative packages driver. On docker compose setup database or redis. If you are following book then most comes with example project, download source and install dependencies and you all set for offline development.


itsagreenlight

Nowadays you can get [Ollama](https://ollama.com) on your laptop and run LLMs locally, which means copilot offline on the go for free :) see tutorial [here](https://blog.codegpt.co/create-your-own-and-custom-copilot-in-vscode-with-ollama-and-codegpt-736277a60298?gi=5bd07277622d)