unsafeconv

command module
v0.0.0-...-9e80811 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2023 License: BSD-3-Clause Imports: 9 Imported by: 0

README

$ go build
$ ./unsafeconv std \
	github.com/boltdb/bolt... \
	github.com/google/gopacket... \
	golang.org/x/net... \
	golang.org/x/sys... \
	golang.org/x/tools... >output.txt

$ awk '$2~/convert/ {print $2, $NF}' output.txt | sort | uniq -c
   4 array-convert addr-of-index-of-non-slice
  33 array-convert addr-of-non-index
  58 array-convert non-addr-of
   8 array-convert valid
  25 slice-convert slice-elem-mismatch
  10 slice-convert valid

Documentation

Overview

Unsafeconv finds unsafe conversions that might be made better with the proposals for unsafe.Slice and (*[10]int)(x[:]). It also finds those that won't fit the mold.

Usage:

unsafeconv pkgs...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL