Documentation
¶
Overview ¶
Ema.Tools - Publishing Reworked Copyright (C) 2026 Team Quadrimus
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Ema.Tools - Publishing Reworked Copyright (C) 2026 Team Quadrimus
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Ema.Tools - Publishing Reworked Copyright (C) 2026 Team Quadrimus
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Ema.Tools - Publishing Reworked Copyright (C) 2026 Team Quadrimus
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Ema.Tools - Publishing Reworked Copyright (C) 2026 Team Quadrimus
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Ema.Tools - Publishing Reworked Copyright (C) 2026 Team Quadrimus
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Ema.Tools - Publishing Reworked Copyright (C) 2026 Team Quadrimus
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Ema.Tools - Publishing Reworked Copyright (C) 2026 Team Quadrimus
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Index ¶
Constants ¶
const ( ExitCodeUnknownError = 1 ExitCodeInvalidArgs = 2 ExitCodeInvalidFormat = 3 ExitCodeRunError = 4 )
Variables ¶
This section is empty.
Functions ¶
func ExitCode ¶
ExitCode returns exit code from passed error. If passed error or its wrapped error doesn't implement ExitCode, it returns ExitCodeUnknownError. See also ExitError.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context represents cancelable context which also reacts to os.Interrupt signal.
func NewContext ¶
NewContext returns new Context based on parent.
type ExitCodeBearer ¶
type ExitCodeBearer interface {
ExitCode() int
}
ExitCodeBearer represents value with specified exit code. See also ExitCode or ExitError.
type ExitError ¶
ExitError represents error with specified exit code.
func NewExitError ¶
NewExitError creates new ExitError.
func (*ExitError) ErrString ¶
ErrString returns string representation of Err. If e or Err is nil, it returns value "unknown error".
type FileErrors ¶
type FileErrors []error
func (*FileErrors) AppendIfError ¶
func (f *FileErrors) AppendIfError(prefix string, err error)
func (FileErrors) Error ¶
func (f FileErrors) Error() string
func (FileErrors) ErrorOrNilIfEmpty ¶
func (f FileErrors) ErrorOrNilIfEmpty() error
func (FileErrors) ExitCode ¶
func (FileErrors) ExitCode() int