Skip to content

perforce/p4go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

P4Go - A P4API derived API

Docs License: MIT Support

P4Go is a wrapper for the P4 C++ API in Go.

P4Go is a Go module that provides an API to P4 Server. Using P4Go is faster than using the command-line interface in scripts, because multiple command can be executed on a single connection, and because it returns P4 Server responses as Go structs.

Requirements

Go 1.24

The P4API relevant to your platform:

OpenSSL 3

  • On Linux, this is typically the libssl-dev package
  • On MacOS/Windows you'll need prebuilt platform specific binaries

Build flags

  • Linux
go env -w CGO_CPPFLAGS="-I<absolute path to Perforce C++ API>/include -g"
go env -w CGO_LDFLAGS="-L<absolute path to Perforce C++ API>/lib -lp4api -lssl -lcrypto"
  • MacOS
go env -w CGO_CPPFLAGS="-I<absolute path to Perforce C++ API>/include -g"
go env -w CGO_LDFLAGS="-L<absolute path to Perforce C++ API>/lib -L<absolute path to OpenSSL libraries matching Perforce C++ API> -lp4api -lssl -lcrypto -framework ApplicationServices -framework Foundation -framework Security"
  • Windows
go env -w CGO_ENABLED=1
go env -w CGO_CPPFLAGS="-I<absolute path to Perforce C++ API>/include -DOS_NT -g"
go env -w CGO_LDFLAGS="-L<absolute path to Perforce C++ API>/lib -L<absolute path to OpenSSL libraries matching Perforce C++ API> -lp4api -lssl -lcrypto -lcrypt32 -lws2_32  -lole32 -lshell32 -luser32 -ladvapi32 -lole32 -pthread -v"

Documentation

Official documentation is located on the Perforce website

Support

P4Go is officially supported by Perforce. Pull requests will be managed by Perforce's engineering teams. We will do our best to acknowledge these in a timely manner based on available capacity.
Issues will not be managed on GitHub. All issues should be recorded via Perforce's standard support process.

License

This project is licensed under the MIT License. See LICENSE for details.

Third-Party Notices

This project includes third-party components. Their licenses and attributions are listed in THIRD-PARTY-NOTICES.

About

[Officially Supported] P4Go is a wrapper for the P4 C++ API in Go.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published