Releases: nabbar/golib
Update Package Progress
Add
- increment func in bar interface
- refill func in bar interface
- getMpb to get MPB lib objet in both bar & progresss interface
- add func NewBarSimpleCounter to use counter instead of ETA in progress interface
Chg
- rename func NewBarSimple to NewBarSimpleETA in progress interface
Add Package ProgressBar
Add Package Progress Bar :
- use multi bar lib (github.com/vbauerster/mpb/v5)
- implement njs-semaphore link
- update dependancies
Fix :
- build C (njs-ioutils) :
use/usr/bin/[i686|x86_64]github.com/vbauerster/mpb/v5 -c maxstdio.c
instead ofgcc -c maxstdio.c
to prevent implicit declaration
Add implementation of FD NOFILE rlimit
The rLimit is not implemented in Go for Windows.
This is beacause strictly rLimit does not exist in Windows.
But security of Windows use similar function to limite File Descriptor I/O
This version add a implementation of C call of the windows function to offer similar functionnalities
For Windows build, please follow this note :
Install required packages
Install package to build C source with GCC (need sometimes to details package x86_64 for win64 and i686 for win32 package)
- gcc-multilib
- gcc-mingw-w64
sudo apt-get install gcc-multilib gcc-mingw-w64
Normally, you will having this binaries
- i686-w64-mingw32* for 32-bit Windows;
- x86_64-w64-mingw32* for 64-bit Windows.
Locate you binaries gcc mingw path and note it:
- win32 : updatedb && locate i686-w64-mingw32-gcc
- win64 : updatedb && locate x86_64-w64-mingw32-gcc
Rebuild object C if needed
if you have an error in the build, or if the .o object file is not present in golib/njg-ioutils/maxstdio/
, run this step
cd golib/njg-ioutils/maxstdio
gcc -c maxstdio.c
Build you go code with the C dependancies :
We will specify some env var in prefix of launching line of go build.
We recommend to use the -a flag of go build to force system to rebuild all dependancies and do not use precompiled code
For Win32 :
CC=/usr/bin/i686-w64-mingw32-gcc CGO_ENABLED=1 GOOS=windows GOARCH=386 go build -a -v ...
For Win64 :
CC=/usr/bin/x86_64-w64-mingw32-gcc CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -a -v ...
Add new package semaphore & new function in IOutils
Add new package for semaphore :
- Semaphore interface
- constructor with context handling
- func for managing worker
- func for cancel
Add func for IOutils
- fileDescriptor function to retrieve or try to change the current file descriptor setting
Change :
- Bump dependancies
Fix console/color
Fix :
- issue 03 : missing calling lib functionn
Add :
- Add function buffPrintf : printf directly into a bufio pointer
Chg :
- Bump dependancies
Add trace option in package Errors
Add trace management in error package :
- Upd function ErrorWithCode to ErrorFull in ErrorCode interface
- Upd function StringWithCode to StringFull in ErrorCode interface
- Add attached function Trace in ErrorCode interface
- Upd function GetErrorCode
- Add function GetTraceErrorCode
- Fix doc comments
Add Package njs-errors
Add New package to manage Error (string) with code :
- Add a type ErrorType
- Add attached func String to ErrorType
- Add attached func Error to ErrorType
- Add ErrorCode interface
- Add attached func Error to ErrorCode
- Add attached func ErrorWithCode to ErrorCode
- Add attached func String to ErrorCode
- Add attached func StringWithCode to ErrorCode
- Add attached func Code to ErrorCode
- Add list management func SetErrorCode
- Add list management func SetErrorCodeString
- Add list management func DelErrorCode
- Add list management func DelAllErrorCode
- Add list management func GetErrorCode
First stable version
First stable version