You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now in the file pkg, a number of constructor functions take a variadic arguments in place of an optional argument. I would recommend against such a practice; it isn't clear what the string array is for at first glance. I might suggest something like:
package file
typeOptionstruct {
Terminatorstring
}
// Option may be omitted.funcNewFile(InterchangeRule, opt*Option) {...}
Another method to capture this might be to create a Constructor type, with perhaps a default package level var constructor, where new files and methods are created from, with the options on them. Or maybe not.
The text was updated successfully, but these errors were encountered:
Right now in the file pkg, a number of constructor functions take a variadic arguments in place of an optional argument. I would recommend against such a practice; it isn't clear what the string array is for at first glance. I might suggest something like:
Another method to capture this might be to create a Constructor type, with perhaps a default package level var constructor, where new files and methods are created from, with the options on them. Or maybe not.
The text was updated successfully, but these errors were encountered: