我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何覆盖func(l * Logger)Println(v…interface {})方法golang?

How to override println method in golang?

func (l *Logger) Println(v ...interface{})

How to override ... [a] method golang?

Not at all. You simply cannot do this. Go does not provide any means of inheritance. Don't try, you will not succeed. You must use an other solution to your problem (which you did not state).

近期文章

  • Go似乎没有传递指针,我认为它是这样
  • 无互斥
  • 如果我将golang的增量乘以for循环不增加
  • 是否有将PHP函数与Go版本进行比较的参考? [关闭]
  • Printf错误。可能是新的吗? [重复]
  • 如何在go中调用另一个函数?
  • 如何对init()函数进行基准测试
  • 在NewX函数上返回指针背后有充分的理由吗? [重复]
  • 如何在Go lang中读取config.json?
  • 同步Go例程有什么需要
  • 如何使用反射获取切片数据?
  • 在go中从另一个函数调用变量
  • 字符串和整数串联问题golang
  • 尝试将数据解组到Golang中的接口
  • 如何将DATE转换为salesforce中的数据类型DATE
  • 去样式指南? [关闭]
  • 高朗的布尔型
  • Golang解组JSON列表
  • 具有自己实现的处理程序的服务器未连续侦听
  • Golang异步和CPU使用率

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华