function FileOptions::getGoPackage
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>
Return value
string
File
-
vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ FileOptions.php, line 541
Class
- FileOptions
- Generated from protobuf message <code>google.protobuf.FileOptions</code>
Namespace
Google\Protobuf\InternalCode
public function getGoPackage() {
return isset($this->go_package) ? $this->go_package : '';
}