function FileOptions::setGoPackage
Sets the Go package where structs generated from this .proto will be placed. If omitted, the Go package will be derived from the following:
- The basename of the package import path, if provided.
- Otherwise, the package statement in the .proto file, if present.
- Otherwise, the basename of the .proto file, without extension.
Generated from protobuf field <code>optional string go_package = 11;</code>
Parameters
string $var:
Return value
$this
File
-
vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ FileOptions.php, line 567
Class
- FileOptions
- Generated from protobuf message <code>google.protobuf.FileOptions</code>
Namespace
Google\Protobuf\InternalCode
public function setGoPackage($var) {
GPBUtil::checkString($var, True);
$this->go_package = $var;
return $this;
}