mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-16 23:12:43 +00:00
Resolve TODO: Enable pagination on GiteaDownloader.GetComments() & update another TODO (#16963)
* Update TODO in migrations * Resolve TODO: enable pagination on GiteaDownloader.GetComments()
This commit is contained in:
parent
a807031a30
commit
cf6d398485
2 changed files with 40 additions and 44 deletions
|
@ -475,10 +475,7 @@ func Init() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// isIPPrivate reports whether ip is a private address, according to
|
||||
// RFC 1918 (IPv4 addresses) and RFC 4193 (IPv6 addresses).
|
||||
// from https://github.com/golang/go/pull/42793
|
||||
// TODO remove if https://github.com/golang/go/issues/29146 got resolved
|
||||
// TODO: replace with `ip.IsPrivate()` if min go version is bumped to 1.17
|
||||
func isIPPrivate(ip net.IP) bool {
|
||||
if ip4 := ip.To4(); ip4 != nil {
|
||||
return ip4[0] == 10 ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue