We have an issue (https://github.com/go-lang-plugin-org/go-lang-idea-plugin/issues/1556) about supporting a special syntax highlighting for deprecated symbols. As far as I understand at the moment there is no a standard way to markup it.
// MyFunc fires all the missiles.//// Deprecated: Due to budget cuts, there are no missiles.
// MyFunc is now a no-op and should no longer be called.//
// More information about MyFunc might go here.
func MyFunc()// A MyType is a database record describing a person.type MyType struct {// Name is the person's name.//// Deprecated: There is confusion in the existing records about whether// name is the full name or just the first name. Use FirstName or FullName instead.Name string// FirstName is the person's first name, for use in the salutation in a form letter.FirstName string// FullName is the person's full name, for use in address labels.FullName string}
// MyFunc fires all the missiles.//
// @deprecated Due to budget cuts, there are no missiles. MyFunc is now a no-op and should no longer be called.
//
// More information about MyFunc might go here.
func MyFunc()
--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Late to this discussion but perhaps it should beDEPRECATED rather then Deprecated ?In style with BUG, TODO, etc. ?
I think I'd still lean toward "Deprecated:".
--
Someone will spell it "Depreciated" and wonder why everyone is still using their function. So be it, "Deprecated" is the right word and right emphasis.
I think// @Deprecated This API is bad performance.is more distinguishable .
// @Deprecated This API is bad performance.@Deprecated
// It is not used in the future .
func add() {
//
}
--
On May 18, 2015 10:40 AM, "Russ Cox" <r...@golang.org> wrote:
>
> Yes, there have been many ad-hoc solutions. Now we have a canonical one.
Should we update the code to use the new convention?
Should http://golang.org/doc/effective_go.html#commentary be updated to mention this?