Skip to content

rostislaved/slice-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slice analyzer

It just prints detailed slice structure

Example

package main

import (
	sliceanalyzer "github.com/rostislaved/slice-analyzer"
)

func main() {
	s1 := []int{1, 2, 3}
	sliceanalyzer.Print(s1, "s1")

	s2 := append(s1, 4, 5)
	sliceanalyzer.Print(s2, "s2")

	s3 := s2[1:4]
	sliceanalyzer.Print(s3, "s3")
}

Output:

img.png

About

Small tool to inspect and print Go slice structure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages