Skip to content

Releases: nabbar/golib

Update Package Progress

26 Jun 11:04
Compare
Choose a tag to compare

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

24 Jun 15:59
Compare
Choose a tag to compare

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 of gcc -c maxstdio.c to prevent implicit declaration

Add implementation of FD NOFILE rlimit

18 Jun 12:48
Compare
Choose a tag to compare

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

17 Jun 14:13
Compare
Choose a tag to compare

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

12 Jun 12:25
Compare
Choose a tag to compare

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

11 May 14:05
Compare
Choose a tag to compare

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

11 May 13:07
Compare
Choose a tag to compare

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

05 May 08:58
Compare
Choose a tag to compare

First stable version