google / google/styleguide

Go: update `interface{}` to `any`

Open
#770 2 comments 0 reactions 0 assignees View on GitHub
lang:go
Dominant language
HTML
Stars
39.6k
Forks
12.9k
Avg merge
42m
Merged PRs (30d)
15

Description

After go.1.18 you can use `any` and `interface{}` are interchangeably.

I would love the change so when I do a ctrl+F and look for styles around how `interface`s should work I don't get false positives.

The style guide [already prefers the use](https://google.github.io/styleguide/go/decisions#use-any).

I would just want the examples here updated
* https://google.github.io/styleguide/go/decisions#assertion-libraries
* https://google.github.io/styleguide/go/best-practices#parameters-and-configuration

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.