-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(buildtool): support go1.18+ (#1483)
See ooni/probe#2664
- Loading branch information
1 parent
9b59892
commit 3760c2d
Showing
9 changed files
with
90 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Package logmodel contains the core log model. | ||
// | ||
// This package has been separated from the ./internal/model package | ||
// so that ./internal/cmd/buildtool can support go1.18+. | ||
// | ||
// See https://github.com/ooni/probe/issues/2664 for context. | ||
package logmodel | ||
|
||
// DebugLogger is a logger emitting only debug messages. | ||
type DebugLogger interface { | ||
// Debug emits a debug message. | ||
Debug(msg string) | ||
|
||
// Debugf formats and emits a debug message. | ||
Debugf(format string, v ...interface{}) | ||
} | ||
|
||
// InfoLogger is a logger emitting debug and infor messages. | ||
type InfoLogger interface { | ||
// An InfoLogger is also a DebugLogger. | ||
DebugLogger | ||
|
||
// Info emits an informational message. | ||
Info(msg string) | ||
|
||
// Infof formats and emits an informational message. | ||
Infof(format string, v ...interface{}) | ||
} | ||
|
||
// Logger defines the common interface that a logger should have. It is | ||
// out of the box compatible with `log.Log` in `apex/log`. | ||
type Logger interface { | ||
// A Logger is also an InfoLogger. | ||
InfoLogger | ||
|
||
// Warn emits a warning message. | ||
Warn(msg string) | ||
|
||
// Warnf formats and emits a warning message. | ||
Warnf(format string, v ...interface{}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters