Searching We.Love.Privacy.Club

Twts matching #go
Sort by: Newest, Oldest, Most Relevant

@fastidious@arrakis.netbros.com the things Gemini has going for it are mutual TLS and lack of JavaScript. Which makes for a secure albeit boring experience (much like gopher). The fake markdown is a bit of a drag.

A render mode for Gemini probably wouldnt be too hard. There are markdown to Gemini libs out there.

With Web3 the whole trust a 3rd party browser ext + high fees + env impact for compute and storage are serious no gos for me.. I have heard one too many horror stories about clicking the wrong link and some script draining your metamask wallet.

⤋ Read More

go 1.18 泛型初体验

go 1.18 泛型初体验

go.1.18beta 版发布,众所周知这个 go.1.18 版本会默认启用 go 泛型。这个版本也号称 go 最大的版本改动。

初识 golang 的泛型

我们写一个 demo 来看看 go 的泛型是长啥样

”`

package main

import (

<span class="s">"fmt"</span>

)

type OrderTypesRead more”`

⤋ Read More

漏桶限流库 — uber-go/ratelimit
编辑推荐:Bazinga

上次有同学分享了 单机限流器 time/rate 库,讲了 Golang 标准库中基于令牌桶实现限流组件的 time/rate 使用,同时也讲了一些限流算法原理。

这里分享一个 uber 开源的一套基于漏桶实现的用于服务限流的 golang 库 ratelimit

漏洞算法的理解起来,相较于令牌桶,没有那么直观。因为令牌桶是限�� … ⌘ Read more

⤋ Read More

用 Go + Redis 实现分布式锁

为什么需要分布式锁
  1. 用户下单

锁住 uid,防止重复下单。

  1. 库存扣减

锁住库存,防止超卖。

  1. 余额扣减

锁住账户,防止并发操作。
分布式系统中共享同一个资源时往往需要分布式锁来保证变更资源一致性。

分布式锁需要具备特性
  1. 排他性

锁的基本特性,并且只能被第一个持有者持有。

  1. 防死锁

高并发场景下临界 … ⌘ Read more

⤋ Read More

GoCN 每日新闻(2021-12-13)
GoCN 每日新闻(2021-12-13)

  1. 尝鲜 Go 1.18 范型版本的 map 和 slice!https://juejin.cn/post/7040800455349239822
  2. Go 实现可序列化的 Roaring Bitmapshttps://dgraph.io/blog/post/serialized-roaring-bitmaps-golang/
  3. Go 使用 Github Actions 做 CI[https://www.alexedwards.net/blog/ci-with-go-and-github-actions](https://www.alexedwards.net/blog/ci-with-go-and-github … ⌘ Read more

⤋ Read More

Isode: Successfully Managing HF Radio Networks
With the potential for new technologies to cause interference to traditional communications networks and even space itself at the risk of becoming weaponised, it is important to make sure that you always have a backup plan for your communications ready and waiting.

Should the worst happen and your primary network, typically SatCom, go down you need to ensure that you can still communicate with your forces wherever they are, and that c … ⌘ Read more

⤋ Read More

BigCache 针对 Go 垃圾回收的设计优化

为什么有这篇文章

某一天在群里摸鱼的时候,看到群里有人问 go map 的空间回收问题,把截图贴上吧:

Image

其实一位群友发出的问题引起了我注意,他的问题是: gomap 的值调用了 delete 函数是不是不会立即删除?当然这个问题如果研究过或者深入 go 的内存分� … ⌘ Read more

⤋ Read More

Apache Log4j 2 CVE-2021-44228
We know that many of you are working hard on fixing the new and serious Log4j 2 vulnerability CVE-2021-44228, which has a 10.0 CVSS score. We send our #hugops and best wishes to all of you working on this vulnerability, now going by the name Log4Shell. This vulnerability in Log4j 2, a very common Java […]

The post Apache Log4j 2 CVE-2021-44228 appeared first on Docker Blog. ⌘ Read more

⤋ Read More

快速搭建私有云服务 go-btfs

快速搭建私有云服务 go-btfs 1. go-btfs 是什么?

go-btfs go-btfs 是一个去中心化的文件存储平台,无论图片、文件、视频等等各类文件。
每个人都可以在自己电脑上安装部署 BTFS 节点,然后大家的节点相互连接,构成一个整体网络,
网络中某一个节点上传文件,其他节点就像访问本地一样直接下载使用。同时,它还支持冗余备份,使用 reed-solomn … ⌘ Read more

⤋ Read More

【上海】【米哈游】Golang 研发工程师
职位描述:

1、负责米哈游游戏的官网、活动的开发;

2、负责线上活动和游戏工具的维护和迭代;

3、归纳和封装活动的通用组件和基础服务;

岗位要求:

1、计算机相关专业本科及以上学历,有两年以上后台开发经验;

2、熟悉 Go 语言,有实际使用 Go 语言项目开发经验;

3、对微服务架构有一定程度的研究并有开发经验,在服务治理,服务监 … ⌘ Read more

⤋ Read More

GoCN 每日新闻 (2021-12-10)
GoCN 每日新闻 (2021-12-10)

  1. bob 一个从天上掉下来的构建工具https://github.com/benchkram/bob
  2. hackgo 编译器让 go 添加一个新的关键字https://avi.im/blag/2021/rc-day-24/
  3. 一个” 自由 “解析 xml 而不是预定义 struct 的工具https://github.com/xrfang/fxml
  4. 一个真开源的 mongodb 的替代者[https://github.com/FerretDB/FerretDB](https://gi … ⌘ Read more

⤋ Read More

聊聊 TokenBucket 限流器的基本原理及实现

限流器实现之 TokenBucket

大家好,我是「Go 学堂」的渔夫子。上篇文章我们讲解了漏桶(LeakyBucket)的实现原理。本文我们介绍另外一种限流器 — 令牌桶(TokenBucket)。

Image

令牌桶(TokenBucket)简介 令牌桶实现的基本思想

令牌桶,顾名思�� … ⌘ Read more

⤋ Read More

GoCN 每日新闻(2021-12-05)

GoCN 每日新闻(2021-12-05)
  1. Go 在 Google:服务于软件工程的语言设计(翻译) https://mp.weixin.qq.com/s/3F9WAcxuCNCs7aNn5gjnew
  2. 详解布隆过滤器原理与实现https://mp.weixin.qq.com/s/5zHQbDs978OoA3g83NaVmw
  3. 令人惊叹的软件架构[https://github.com/mehdihadeli/awesome-software-architecture](https://github.com/mehdihadeli/awesome-software-archite … ⌘ Read more

⤋ Read More

更严格的代码格式化工具 gofumpt

前言

gofmt 是 golang 自带的代码自动格式化工具,是保证 Go 代码风格一致的大杀器。我们这次要推荐的 gofumptgofmt 的基础上添加了一系列更加严格的格式化规则,并保证了对 gofmt 的兼容。

gofumpt 有助于进一步提升代码质量,它已经成为 gopls(Go 官方语言服务)中可选的格式化工具以及 golangci-lint 中支持的 linter,正在被越来越多优秀的开源项目(sourcegraph� … ⌘ Read more

⤋ Read More

Underscores in Imports
Underscores in Imports Underscores in Go serve a few purposes. In U+005F, “_” is a letter (as a string). You may also see them as [ “_” ] in between successive digits and a base prefix. In this case, it’s to improve the readability of the code. You may also see them in function names, e.g., imaginary_lit.
The underscore is quite a versatile tool. They even have their place in defining the kind of action that will take place in a function. ⌘ Read more

⤋ Read More

Powering Starlink on the go with Tesla Model 3
I’ve had my Tesla Model 3 for more than a year now. It has been an
absolute pleasure so far and I would not trade it for anything else at
any price including Tesla’s other offerings (yes, talking about S
Plaid). Model 3 just has the most beautiful exterior of any other car.
OK, let’s stop here because I can go on forever. But not without a photo
of Tin Can:

Image

“Tin Can” is a r … ⌘ Read more

⤋ Read More

No on gitlab. If its self hosted gitea is best in class.

I can see hosting a mirror on github if only for the redundancy/visibility. Some projects will host but then direct contributions on their self host. Like Go does.

I would suggest using a vanity domain that can redirect tools like go get to hosting of choice. And not require rewriting all the packages any time it gets moved.

⤋ Read More