Separate domains
With this release cdp is very close to a v1.0.0-release.
For a complete changelog, see v0.8.0...v0.9.0.
NOTE: This release is a breaking change from the previous API (just published as v0.8.0).
Instead of domain types belonging to one of cdpcmd, cdpevent or cdptype, they all now reside in a single package, e.g. network. All domain packages are contained in the protocol
package.
This is a big refactor of the generated code that represents all the different CDP domains.
For the common use-case, only the args need to be rewritten:
cdpcmd.NewNetworkEnableArgs()->network.NewEnableArgs()&cdpcmd.NetworkEnableArgs{}->&network.EnableArgs{}
IMPORTANT: A number of changes were made to avoid the cyclic dependencies caused by the dom, network and page domains.
Go 1.9:
-
The types
page.FrameIDandpage.ResourceTypeare aliases tointernal.PageFrameIDandinternal.PageResourceType, respectively. The user should use the types defined in thepagedomain. -
The
PageResourceTypeandFrameIDtype aliases were added to theprotocolpackage for full backwards compatibility with Go 1.8. These have been marked deprecated and should not be used in newer code.
Go 1.8:
-
The types
page.FrameIDandpage.ResourceTypewere moved toprotocol.PageFrameIDandprotocol.PageResourceTypeas a fallback since type aliases are not available. -
The enums for
protocol.PageResourceTypeare located in thepagepackage, e.g.page.ResourceTypeDocument. This gives us a smoother transition to type aliases in Go 1.9.