System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go directory by:
| # See: https://olegk.dev/go-linters-configuration-the-right-version | |
| run: | |
| # Depends on your hardware, my laptop can survive 8 threads. | |
| concurrency: 8 | |
| # I really care about the result, so I'm fine to wait for it. | |
| timeout: 30m | |
| # Fail if the error was met. |
| # ================================================================================================== | |
| # | |
| # NOTICE | |
| # | |
| # This gist is no longer maintained. It was moved to repo: | |
| # | |
| # https://github.com/maratori/golangci-lint-config | |
| # | |
| # Full history and all v2 releases are preserved in the repo. | |
| # |
| #!/bin/bash | |
| # for Ubuntu | |
| # Install pre-requirements | |
| sudo apt-get update | |
| sudo apt-get install -y chromium-codecs-ffmpeg-extra | |
| # Import to opera | |
| sudo ln -sf /usr/lib/chromium-browser/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so |
| package main | |
| import ( | |
| "context" | |
| "grpc-tutorial/greeter" | |
| "io" | |
| "log" | |
| "os" | |
| "os/signal" | |
| "sync" |
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| type Animal interface { | |
| MakeSound() string | |
| } |
System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go directory by:
| package a | |
| import "fmt" | |
| type Sayer interface { | |
| Say() string | |
| } | |
| type Formal struct{} |
| import R from 'ramda' | |
| const isObject = R.compose(R.equals('Object'), R.type); | |
| const allAreObjects = R.compose(R.all(isObject), R.values); | |
| const hasLeft = R.has('left'); | |
| const hasRight = R.has('right'); | |
| const hasBoth = R.both(hasLeft, hasRight); | |
| const isEqual = R.both(hasBoth, R.compose(R.apply(R.equals), R.values)); | |
| const markAdded = R.compose(R.append(undefined), R.values); |