- Presenting the potato code, part 1
- Using
mockgen
fromgolang/mock
//go:generate
commands for mocks generation- CI check for updated mocks, see
mocks.yml
- Testing
CutAndFry
withgolang/mock
, seepotato_test.go
part 1 - Mock calls order, see
previousCall *gomock.Call
- Comparing with
golang/mock
withmockery
, seepotato_mockery_test.go
- Presenting the potato code, part 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/rand" | |
"encoding/binary" | |
"fmt" | |
"hash/maphash" | |
mathrand "math/rand" | |
"runtime" | |
"sync" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
"io" | |
"log" | |
"net" | |
"net/http" | |
"net/smtp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"context" | |
"crypto/tls" | |
"errors" | |
"fmt" | |
"io/ioutil" | |
"log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:buster-slim | |
WORKDIR /domoticz | |
EXPOSE 8080/tcp 443/tcp 6144 | |
ENTRYPOINT [ "/domoticz/domoticz" ] | |
RUN apt-get update -y && \ | |
apt-get install -y wget libusb-0.1-4 libcurl3-gnutls && \ | |
wget -q -O domoticz.tgz https://releases.domoticz.com/releases/release/domoticz_linux_x86_64.tgz && \ | |
tar -xf domoticz.tgz && \ | |
rm domoticz.tgz *.txt |
If you don't know what Wireguard is, well, you should. It's fast, easy to setup and highly configurable. We will configure Wireguard for multiple users with various restrictions using iptables.
This should fit most setups (not mine though 😉)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Buildx release | |
on: | |
release: | |
types: [published] | |
paths-ignore: | |
- .github/workflows/buildx-latest.yml | |
- README.md | |
jobs: | |
buildx: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Buildx latest | |
on: | |
push: | |
branches: [master] | |
paths-ignore: | |
- .github/workflows/buildx-release.yml | |
- README.md | |
jobs: | |
buildx: | |
runs-on: ubuntu-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Buildx latest | |
on: | |
push: | |
branches: [master] | |
paths-ignore: | |
- .github/workflows/buildx-release.yml | |
- README.md | |
jobs: | |
buildx: | |
runs-on: ubuntu-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"global": { | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": false | |
}, | |
"profiles": [ | |
{ | |
"name": "Default profile", | |
"selected": true, |
NewerOlder