Skip to content

Conversation

@fw-bot
Copy link
Collaborator

@fw-bot fw-bot commented Jul 14, 2023

Examples rely on kolo/xmlrpc as well as on the standard library package log to panic on error, matching snippets in other languages (which tend to raise exceptions).

As with other languages, only the RPC interaction is spelled out.

Forward-Port-Of: #5064

mrhdias added 8 commits July 14, 2023 11:25
The code examples in Go have been added in the same places as existing examples for other programming languages. All Go examples are based on existing examples, but respecting the specificities of the Go language. All examples have been tested with a local installation of odoo v16 and work fine, except the odoo test database which always returns an error. The Go code for testing can be found here:
https://gist.github.com/mrhdias/f58106caa1e148c925cbe0b24635ef75

X-original-commit: 0a65b08
The RST text formatting errors have been fixed

X-original-commit: 0a65b08
The last issue with text formatting has been fixed.

X-original-commit: 0a65b08
The requested changes have been made:
All json output formatting has been removed in all snippets;
The client is no longer closed;
No more output of results in all snippets.

X-original-commit: 0a65b08
All go examples have been simplified. No more outputs in all go examples (including error output). Inconsistency between maps and structures has been eliminated.

X-original-commit: 0a65b08
A small typo in the authentication example has been fixed. Array replacement by map.

X-original-commit: 0a65b08
One more correction. The constants url, db, username and password were replaced by variables, so that they can be assigned with new values.

X-original-commit: 0a65b08
Now errors can be checked immediately before proceeding to the next steps.

X-original-commit: 0a65b08
@robodoo
Copy link
Collaborator

robodoo commented Jul 14, 2023

@fw-bot
Copy link
Collaborator Author

fw-bot commented Jul 14, 2023

This PR targets saas-16.2 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

robodoo pushed a commit that referenced this pull request Jul 14, 2023
Examples rely on `kolo/xmlrpc` as well as on the standard library package `log` to panic on error, matching snippets in other languages (which tend to raise exceptions).

As with other languages, only the RPC interaction is spelled out.

closes #5127

Forward-port-of: #5064
Signed-off-by: Xavier Morel (xmo) <[email protected]>
@robodoo robodoo temporarily deployed to merge July 14, 2023 15:16 Inactive
@robodoo robodoo closed this Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants