Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cleanup] Rewrite interface{} to any #156

Closed
1 task
Olshansk opened this issue Aug 8, 2022 · 2 comments · Fixed by #446
Closed
1 task

[Cleanup] Rewrite interface{} to any #156

Olshansk opened this issue Aug 8, 2022 · 2 comments · Fixed by #446
Assignees
Labels
code health Nice to have code improvement core starter task Good for newcomers, but aimed at core team members though still open for everyone

Comments

@Olshansk
Copy link
Member

Olshansk commented Aug 8, 2022

Objective

Replace all interface{} with any. See golang/go#49884:

Screen Shot 2022-08-08 at 2 53 12 PM

Origin Document

The suggestion was brought up here: #139 (comment)

Screen Shot 2022-08-08 at 2 52 44 PM

Goals / Deliverables

  • Rewrite interface{} to any

Non-goals

  • Add / modify existing business logic

Testing Methodology`

  • All tests: make test_all
  • LocalNet: verify a LocalNet is still functioning correctly by following the instructions at docs/development/README.md
    Remove

Creator: @Olshansk
Co-Owners: @deblasis

@Olshansk Olshansk added code health Nice to have code improvement community Open to or owned by a non-core team member starter task labels Aug 8, 2022
@Olshansk Olshansk changed the title [CLEANUP] Rewrite interface{} to any [Cleanup] Rewrite interface{} to any Aug 22, 2022
@Olshansk Olshansk added the core starter task Good for newcomers, but aimed at core team members though still open for everyone label Oct 7, 2022
@jessicadaugherty jessicadaugherty removed community Open to or owned by a non-core team member starter task core starter task Good for newcomers, but aimed at core team members though still open for everyone labels Nov 28, 2022
@Olshansk Olshansk added the core starter task Good for newcomers, but aimed at core team members though still open for everyone label Dec 15, 2022
@h5law
Copy link
Contributor

h5law commented Jan 18, 2023

This can be done with find ./ \( -type d -name .git -prune \) -o -type f -name '*.go' -print0 | xargs -0 sed -i 's/interface{}/any/g' will make PR now

@Olshansk
Copy link
Member Author

This can be done with find ./ \( -type d -name .git -prune \) -o -type f -name '*.go' -print0 | xargs -0 sed -i 's/interface{}/any/g' will make PR now

That is some bash foo 🥋

h5law added a commit that referenced this issue Jan 20, 2023
## Description

Simply replace all occurances of `interface{}` with `any` - using the
shell command

```bash
find ./ \( -type d -name .git -prune \) -o -type f -name '*.go' -print0 | xargs -0 sed -i 's/interface{}/any/g'
```

## Issue

Fixes #156 

## Type of change

Please mark the relevant option(s):

- [ ] New feature, functionality or library
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Major breaking change
- [ ] Documentation
- [ ] Other <!-- add details here if it a different type of change -->

## List of changes

- Replace all instances of `interface{}` with `any`

## Testing

- [x] `make develop_test`
- [x]
[LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md)
w/ all of the steps outlined in the `README`

## Required Checklist

- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have tested my changes using the available tooling
- [x] I have updated the corresponding CHANGELOG

### If Applicable Checklist
- [ ] I have updated the corresponding README(s); local and/or global
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added, or updated,
[mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding
README(s)
- [ ] I have added, or updated, documentation and
[mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*`
if I updated `shared/*`README(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health Nice to have code improvement core starter task Good for newcomers, but aimed at core team members though still open for everyone
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants