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. |
# This code is licensed under the terms of the MIT license https://opensource.org/license/mit | |
# Copyright (c) 2021 Marat Reymers | |
## Golden config for golangci-lint v1.62.0 | |
# | |
# This is the best config for golangci-lint based on my experience and opinion. | |
# It is very strict, but not extremely strict. | |
# Feel free to adapt and change it for your needs. | |
run: |
#!/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); |