小编joz*_*ozo的帖子

为什么从 Go 1.17 开始 go.mod 中有两个“require”块?

我创建了一个小型 go 应用程序。几天前,我从 go 1.15 升级到 1.17,并且还使用go get -u. 更改后,我的 go.mod 文件中有 2 个 require 块。为什么?这是什么意思?没问题还是有什么东西坏了?

应用程序仍然可以正确构建。

go.mod 文件:

module github.com/jozo/simple-pomodoro

go 1.17

require (
    fyne.io/fyne/v2 v2.1.0
    github.com/dsnet/golib/memfile v1.0.0
    github.com/faiface/beep v1.1.0
    github.com/fsnotify/fsnotify v1.5.1 // indirect
    github.com/go-gl/gl v0.0.0-20210905235341-f7a045908259 // indirect
    github.com/go-gl/glfw/v3.3/glfw v0.0.0-20210727001814-0db043d8d5be // indirect
    github.com/godbus/dbus/v5 v5.0.5 // indirect
    github.com/hajimehoshi/oto v1.0.1 // indirect
    github.com/srwiley/oksvg v0.0.0-20210519022825-9fc0c575d5fe // indirect
    github.com/srwiley/rasterx v0.0.0-20210519020934-456a8d69b780 // indirect
    github.com/yuin/goldmark v1.4.1 // indirect
    golang.org/x/exp v0.0.0-20210916165020-5cb4fee858ee // indirect
    golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d // indirect
    golang.org/x/mobile v0.0.0-20210924032853-1c027f395ef7 // indirect
    golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6 // …
Run Code Online (Sandbox Code Playgroud)

go go-modules

39
推荐指数
1
解决办法
1万
查看次数

如何使用Pipenv安装/更新软件包而不更新其余软件包

我使用pipenv(版本2018.11.26)管理项目中的依赖项。有时我只想添加或更新一个软件包,而不更改其他软件包的版本。我该如何实现?我都尝试过

pipenv update --selective-upgrade requests
Run Code Online (Sandbox Code Playgroud)

pipenv update --keep-outdated requests
Run Code Online (Sandbox Code Playgroud)

但仍会在锁定期间更新所有软件包的版本。

Pipfile和Pifile.lock:https://gist.github.com/jozo/d8351ed708e84c5ea0f69e82e585e5c6

python dependency-management pipenv

13
推荐指数
1
解决办法
1572
查看次数

如何获取redis命中率?

我使用 redis 作为缓存服务器。我可以用我的凭据连接到它。如何查明我的 Redis 实例的命中率(命中率)是多少?

python redis

2
推荐指数
1
解决办法
5947
查看次数

列出 Google Cloud 上提供的所有机器类型

AWS CLI 提供命令describe-instance-types来列出所有提供的 EC2 实例类型。它还允许按不同的属性过滤它们。是否可以使用 Google Cloud CLI 执行类似的操作?

我想列出所有提供的机器类型及其属性。此外,我想按属性(内存大小、CPU 等)过滤它们。

google-cloud-platform gcloud

2
推荐指数
1
解决办法
2863
查看次数