mirror of
https://github.com/netbirdio/gomobile-tvos-fork.git
synced 2026-05-22 18:43:29 -07:00
all: use "reports whether" in godoc comments
Go documentation style for boolean funcs is to say:
// Foo reports whether ...
func Foo() bool
rather than "returns true if" or "returns whether".
Change-Id: I5d01c45a8867b47462ed142a49ad51bf0a319ce1
Reviewed-on: https://go-review.googlesource.com/c/151957
Reviewed-by: Elias Naur <elias.naur@gmail.com>
This commit is contained in:
committed by
Tobias Klauser
parent
a27dd33d35
commit
ca3c58166e
+3
-3
@@ -458,8 +458,8 @@ func (g *Generator) validPkg(pkg *types.Package) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// isSigSupported returns whether the generators can handle a given
|
||||
// function signature
|
||||
// isSigSupported reports whether the generators can handle a given
|
||||
// function signature.
|
||||
func (g *Generator) isSigSupported(t types.Type) bool {
|
||||
sig := t.(*types.Signature)
|
||||
params := sig.Params()
|
||||
@@ -477,7 +477,7 @@ func (g *Generator) isSigSupported(t types.Type) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// isSupported returns whether the generators can handle the type.
|
||||
// isSupported reports whether the generators can handle the type.
|
||||
func (g *Generator) isSupported(t types.Type) bool {
|
||||
if isErrorType(t) || isWrapperType(t) {
|
||||
return true
|
||||
|
||||
+1
-1
@@ -372,7 +372,7 @@ func (g *JavaGen) javadoc(doc string) {
|
||||
g.Printf("/**\n * %s */\n", html.EscapeString(doc))
|
||||
}
|
||||
|
||||
// hasThis returns whether a method has an implicit "this" parameter.
|
||||
// hasThis reports whether a method has an implicit "this" parameter.
|
||||
func (g *JavaGen) hasThis(sName string, m *types.Func) bool {
|
||||
sig := m.Type().(*types.Signature)
|
||||
params := sig.Params()
|
||||
|
||||
@@ -58,7 +58,7 @@ func (e Event) String() string {
|
||||
return fmt.Sprintf("lifecycle.Event{From:%v, To:%v, DrawContext:%v}", e.From, e.To, e.DrawContext)
|
||||
}
|
||||
|
||||
// Crosses returns whether the transition from From to To crosses the stage s:
|
||||
// Crosses reports whether the transition from From to To crosses the stage s:
|
||||
// - It returns CrossOn if it does, and the lifecycle change is positive.
|
||||
// - It returns CrossOff if it does, and the lifecycle change is negative.
|
||||
// - Otherwise, it returns CrossNone.
|
||||
|
||||
@@ -40,7 +40,7 @@ type Event struct {
|
||||
// Button is a mouse button.
|
||||
type Button int32
|
||||
|
||||
// IsWheel returns whether the button is for a scroll wheel.
|
||||
// IsWheel reports whether the button is for a scroll wheel.
|
||||
func (b Button) IsWheel() bool {
|
||||
return b < 0
|
||||
}
|
||||
|
||||
+2
-2
@@ -37,7 +37,7 @@ func Disable(c Capability) {
|
||||
alDisable(int32(c))
|
||||
}
|
||||
|
||||
// Enabled returns true if the specified capability is enabled.
|
||||
// Enabled reports whether the specified capability is enabled.
|
||||
func Enabled(c Capability) bool {
|
||||
return alIsEnabled(int32(c))
|
||||
}
|
||||
@@ -450,7 +450,7 @@ func (b Buffer) BufferData(format uint32, data []byte, freq int32) {
|
||||
alBufferData(b, format, data, freq)
|
||||
}
|
||||
|
||||
// Valid returns true if the buffer exists and is valid.
|
||||
// Valid reports whether the buffer exists and is valid.
|
||||
func (b Buffer) Valid() bool {
|
||||
return alIsBuffer(b)
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ func (e *errClsNotFound) Error() string {
|
||||
return "class not found: " + e.name
|
||||
}
|
||||
|
||||
// IsAvailable returns whether the required tools are available for
|
||||
// IsAvailable reports whether the required tools are available for
|
||||
// Import to work. In particular, IsAvailable checks the existence
|
||||
// of the javap binary.
|
||||
func IsAvailable() bool {
|
||||
|
||||
Reference in New Issue
Block a user