progressbar

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 5 Imported by: 4

README

Build Status Coverage Status

Progressbar: A simple and minimalistic Golang progressbar for Mendersoftware projects

Mender logo

Contributing

We welcome and ask for your contribution. If you would like to contribute to the Mender project, please read our guide on how to best get started contributing code or documentation.

License

Mender is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Security disclosure

We take security very seriously. If you come across any issue regarding security, please disclose the information by sending an email to security@mender.io. Please do not create a new public issue. We thank you in advance for your cooperation.

Connect with us

Authors

List!

The Mender project is sponsored by Northern.tech AS.

Documentation

Overview

Copyright 2021 Northern.tech AS

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bar

type Bar struct {
	Size int64

	Renderer
	Percentage int
	// contains filtered or unexported fields
}

func New

func New(size int64) *Bar

func (*Bar) Finish

func (b *Bar) Finish()

func (*Bar) Reset

func (b *Bar) Reset()

func (*Bar) Tick

func (b *Bar) Tick(n int64)

type NoTTYRenderer

type NoTTYRenderer struct {
	Out            io.Writer // Output device
	ProgressMarker string
	// contains filtered or unexported fields
}

func (*NoTTYRenderer) Render

func (p *NoTTYRenderer) Render(percentage int)

type Renderer

type Renderer interface {
	Render(int) // Write the progressbar
}

type TTYRenderer

type TTYRenderer struct {
	Out            io.Writer // Output device
	ProgressMarker string
	// contains filtered or unexported fields
}

func (*TTYRenderer) Render

func (p *TTYRenderer) Render(percentage int)

Jump to

Keyboard shortcuts

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