imghash

package module
v0.0.0-...-206b93c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

README

What do I name this?

The primary objective of this project is to assess the viability of Difference Hashes (DHash) for images in reverse image recognition, and potentially compare it to other, more vetted formats such as Average and Perceptual Hashes. The basic outline for DHashes can be found here.

TODOs
  • Create a more concrete README, with a better outline of the file format as well as the rationale behind the project
  • Add tests for hashes, reading and writing of files (maybe the tree too?)
  • Make the log file actually do something

Documentation

Index

Constants

View Source
const (
	// For unrecoverable errors where you would be unable to continue the current scope of code.
	LogError int = iota

	// For non-critical errors that do not require you to abort/exit from the current scope of code.
	LogWarn

	// For any type of verbose debug specific logging.
	LogDebug
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	*log.Logger
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger() *Logger

Returns a new logger with LogError as the logging level.

func NewLoggerWithLevel

func NewLoggerWithLevel(level int) *Logger

Returns a new logger with the specified log level set, panicking if the log level is invalid.

func (*Logger) Close

func (l *Logger) Close()

Sets the given logging level, panicking if the log level is invalid.

func (*Logger) Debug

func (l *Logger) Debug(format string, a ...any)

func (*Logger) Debugln

func (l *Logger) Debugln(a ...any)

func (*Logger) Error

func (l *Logger) Error(format string, a ...any)

func (*Logger) Errorln

func (l *Logger) Errorln(a ...any)

func (*Logger) SetLogFile

func (l *Logger) SetLogFile(file *os.File)

Sets the given logging level, panicking if the log level is invalid.

func (*Logger) SetLogLevel

func (l *Logger) SetLogLevel(level int)

Sets the given logging level, panicking if the log level is invalid.

func (*Logger) Warn

func (l *Logger) Warn(format string, a ...any)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL