Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1838516
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:29:16+00:00 2026-05-17T06:29:16+00:00

Dealing with go’s funcs I discovered that one can’t force the compiler to control

  • 0

Dealing with go’s funcs I discovered that one can’t force the compiler to control whether I pass a value or pointer-to-value argument when using ‘generic’ interface{} type.

func f(o interface{}) {
...
}

The most obvious solution is to use the following modification:

func f(o *interface{}) {
...
}

Although this is successfully compiled I didn’t find this step right. So, is there any means to state that I want to pass any pointer?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T06:29:17+00:00Added an answer on May 17, 2026 at 6:29 am

    No. At compile time, interface{}, the empty interface, is any type.

    all types implement the empty
    interface: interface{} Interface
    types

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When dealing with persistant MySQL connections, the one problem is that they get dropped
I have this method dealing with a couple array that I can't seem to
When dealing with a collection of key/value pairs is there any difference between using
I am dealing with a set of native functions that return data through dynamically-allocated
I'm dealing with a large code base that uses the following construct throughout class
When dealing with a flash application that will run in a browser, it's obvious
When dealing with websites with large amount of javascript, i see that these are
i'm dealing with memcpy to copy one array into another: here is the code,
When dealing with something like a List<string> you can write the following: list.ForEach(x =>
When dealing with variable argument lists in C, I was just curious to know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.