Logo
Explore Help
Sign In
iSharkFly-Docs/packer-cn
1
0
Fork 0
You've already forked packer-cn
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
packer-cn/common/terminal.go

7 lines
217 B
Go
Raw Normal View History

Moved the progress bar out of packer.Ui and unlinked it out of all the packer.Ui implementations. Split up the terminal-related functions into a separate terminal.go and calculate the progress bar width by traversing through packer.Ui to avoid the issue with github.com/ugorji/go/codec serializing private members (or unsafe pointers) of structs. Shuffled some arguments around in getConsoleScreenBufferInfo in common/terminal_windows.go so that the interface forces the user to correctly declare a _CONSOLE_SCREEN_BUFFER_INFO type.
2018-08-18 23:06:14 -05:00
package common
// call into one of the platform-specific implementations to get the current terminal dimensions
func GetTerminalDimensions() (width, height int, err error) {
return platformGetTerminalDimensions()
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 69ms Template: 5ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API