gocontentful/docs/02-client/06-otherfunctions.md
2024-05-08 16:58:11 +02:00

394 B

Other useful functions

Another thing you might want to know is the content type of an entry with a given ID:

(cc *ContentfulClient) GetContentTypeOfID(ctx, ID string) (contentType string)

Caveats and limitations

  • Avoid creating content types that have field IDs equal to reserved Go words (e.g. "type"). Gocontentful won't scan for them and the generated code will break.