CATEGORY

GOLANG Solutions

Golang read and update same file [SOLVED]

Update file using os.OpenFile with os.O_APPEND flag and Write() function, Using WriteString() function to append string to a file, Using WriteAt() function to …

By tuannguyen · 5 min read · GOLANG Solutions

Delete elements from slice in GO [SOLVED]

Delete elements from slice in golang, first n elements, last n elements, without maintaining the order, maintain the order, delete random elements

By admin · 7 min read · GOLANG Solutions

Golang return error and handle [Best Practices]

We can return errors in golanf func and then handle errors effectively using Casting Errors, Error wrapping mechanism, and Panic, defer and recover

By admin · 5 min read · GOLANG Solutions