Skip to content

v0.6.0

Compare
Choose a tag to compare
@changkun changkun released this 22 Jan 13:10
· 13 commits to main since this release
076d92f

This is release is backward compatible but may change the behavior of using this package.

Previously, the package implicitly checks the capability of using this package at init(). If the requirement is not satisfied, it panics with a helper message for the user. However, panic at init is not recoverable hence we added a new API Init() in this release.

Hence, one may add the following code in the main package to verify if the package is functioning:

package main

import "golang.design/x/clipboard"

func init() {
    err := clipboard.Init()
    if err != nil {
        panic(err)
    }
}