Help us understand the problem. What is going on with this article?


More than 3 years have passed since last update.


package main

import (

func main() {
    t := []string{"0番目","1番目","2番目","3番目","4番目"}
    n := 2
    fmt.Printf("%d番目を削除\n", n)
    t = unset(t, n)

func unset(s []string, i int) []string {
    if i >= len(s) {
        return s
    return append(s[:i], s[i+1:]...)

お仕事内容:プログラマ & たまにインフラ & SEOラングラー & データアナリスト & データサイエンティスト見習い & バリスタじゃないけど、コーヒー淹れる人 & 農家から買い付けて日本茶淹れる人
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away