Skip to content

Instantly share code, notes, and snippets.

View huangyisan's full-sized avatar
🎯
Focusing

Umbrella huangyisan

🎯
Focusing
View GitHub Profile
@huangyisan
huangyisan / gomock.md
Created December 7, 2022 04:56 — forked from thiagozs/gomock.md
Tutorial gomock

08/16/17 by  Sergey Grebenshchikov

No Comments

This is a quick tutorial on how to test code using the GoMock mocking library and the standard library testing package testing.

GoMock is a mock framework for Go. It enjoys a somewhat official status as part of the github.com/golang organization, integrates well with the built-in testing package, and provides a flexible expectation API.

@huangyisan
huangyisan / geth.service
Created October 9, 2022 03:07
systemctl configuration for bsc geth, put it to /etc/systemd/system/
[Unit]
Description=BSC go client
After=syslog.target network.target
[Service]
User=root
Group=root
WorkingDirectory=/data/bsc
Type=simple
ExecStart=/usr/bin/geth --config ./config.toml --datadir ./bsc_data --pprof.addr "127.0.0.1" --metrics --pprof --http --http.addr "0.0.0.0" --http.corsdomain "*" --http.api "personal,eth,net,web3" --http.vhosts "*" --ws --ws.addr "0.0.0.0" --ws.origins "*" --txpool.pricelimit 1 --rpc.allow-unprotected-txs --snapshot=false --cache 32768 --syncmode full --pruneancient --diffblock 28800